branch: elpa/org-journal commit 25c5d95dba217fb8972ad43ce2b5adde32a8b126 Author: JenChieh <jcs090...@gmail.com> Commit: JenChieh <jcs090...@gmail.com>
fix: compile warning for 26.3 --- Eask | 4 ++++ org-journal.el | 29 +++++++++++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Eask b/Eask index 85e26aa753..e6c8dff37f 100644 --- a/Eask +++ b/Eask @@ -14,3 +14,7 @@ (depends-on "emacs" "26.1") (depends-on "org") + +(add-hook 'eask-before-compile-hook + (lambda () + (setq byte-compile-error-on-warn t))) diff --git a/org-journal.el b/org-journal.el index a486bc00ca..e22a7131d7 100644 --- a/org-journal.el +++ b/org-journal.el @@ -111,23 +111,24 @@ (when (version< org-version "9.2") (defalias 'org-set-tags-to 'org-set-tags)) -(unless (fboundp 'org--tag-add-to-alist) - ;; This function can be removed once emacs-26 is required or de-facto standard. - (defun org-tag-add-to-alist (alist1 alist2) - "Append ALIST1 elements to ALIST2 if they are not there yet. +(eval-when-compile + (unless (fboundp 'org--tag-add-to-alist) + ;; This function can be removed once emacs-26 is required or de-facto standard. + (defun org-tag-add-to-alist (alist1 alist2) + "Append ALIST1 elements to ALIST2 if they are not there yet. From branch \"emacs-26\", added for compatibility. " - (cond - ((null alist2) alist1) - ((null alist1) alist2) - (t (let ((alist2-cars (mapcar (lambda (x) (car-safe x)) alist2)) - to-add) - (dolist (i alist1) - (unless (member (car-safe i) alist2-cars) - (push i to-add))) - (append to-add alist2))))) - (defalias 'org--tag-add-to-alist 'org-tag-add-to-alist)) + (cond + ((null alist2) alist1) + ((null alist1) alist2) + (t (let ((alist2-cars (mapcar (lambda (x) (car-safe x)) alist2)) + to-add) + (dolist (i alist1) + (unless (member (car-safe i) alist2-cars) + (push i to-add))) + (append to-add alist2))))) + (defalias 'org--tag-add-to-alist 'org-tag-add-to-alist))) ;;; Customizable variables