Browse Source

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.
Nicolas Goaziou 9 years ago
parent
commit
8eff64cffe
2 changed files with 5 additions and 2 deletions
  1. 3 0
      lisp/org-agenda.el
  2. 2 2
      lisp/org.el

+ 3 - 0
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)

+ 2 - 2
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)