diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-02-11 11:32:14 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-02-11 11:32:14 +0100 |
commit | 8eff64cffee8627578edc33de485201ae579fafe (patch) | |
tree | 4bd28bf0edc617277da463fe1cf9da2bfa236522 | |
parent | 5d817df1254b35ce27c6897fe4c130e070fa231b (diff) | |
download | org-mode-8eff64cffee8627578edc33de485201ae579fafe.tar.gz |
Silence byte-compiler
* lisp/org-agenda.el (org-agenda-current-date): New variable.
(org-agenda-get-day-entries):
* lisp/org.el (org-calendar-holiday): Use new variable.
-rw-r--r-- | lisp/org-agenda.el | 3 | ||||
-rw-r--r-- | lisp/org.el | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 30652b7..b2fd56f 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -2047,6 +2047,8 @@ The buffer is still writable when this hook is called.") (defvar org-agenda-force-single-file nil) (defvar org-agenda-bulk-marked-entries nil "List of markers that refer to marked entries in the agenda.") +(defvar org-agenda-current-date nil + "Active date when building the agenda.") ;;; Multiple agenda buffers support @@ -5340,6 +5342,7 @@ the documentation of `org-diary'." (unless (derived-mode-p 'org-mode) (error "Agenda file %s is not in `org-mode'" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) + (setf org-agenda-current-date date) (save-excursion (save-restriction (if (eq buffer org-agenda-restrict) diff --git a/lisp/org.el b/lisp/org.el index e77fd4a..93062e2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17637,11 +17637,11 @@ D may be an absolute day number, or a calendar-type list (month day year)." (when (numberp d) (setq d (calendar-gregorian-from-absolute d))) (encode-time 0 0 0 (nth 1 d) (car d) (nth 2 d))) +(defvar org-agenda-current-date) (defun org-calendar-holiday () "List of holidays, for Diary display in Org mode." - (declare (special date)) (require 'holidays) - (let ((hl (calendar-check-holidays date))) + (let ((hl (calendar-check-holidays org-agenda-current-date))) (and hl (mapconcat #'identity hl "; ")))) (defun org-diary-sexp-entry (sexp entry d) |