diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-02-06 00:19:02 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-02-06 00:21:59 +0100 |
commit | cb05b3a3d7015273335d07c88efd1edf7abcddef (patch) | |
tree | c19cce4298ea9db590780b6be60bcb83f77811f6 | |
parent | 3178fcb90d2de401122543b0dfbdc102cd590e4c (diff) | |
download | org-mode-cb05b3a3d7015273335d07c88efd1edf7abcddef.tar.gz |
Fix (void-variable d) error
* lisp/org.el (org-check-before-date):
(org-check-after-date): Ensure D enters the lexical scope.
Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/104842>
-rw-r--r-- | lisp/org.el | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lisp/org.el b/lisp/org.el index 8deef60..cce4f3a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17419,14 +17419,15 @@ both scheduled and deadline timestamps." (defun org-check-before-date (d) "Check if there are deadlines or scheduled entries before date D." (interactive (list (org-read-date))) - (let ((case-fold-search nil) - (regexp (org-re-timestamp org-ts-type)) - (callback - `(lambda () + (let* ((case-fold-search nil) + (regexp (org-re-timestamp org-ts-type)) + (ts-type org-ts-type) + (callback + (lambda () (let ((match (match-string 1))) - (and ,(if (memq org-ts-type '(active inactive all)) - '(eq (org-element-type (org-element-context)) 'timestamp) - '(org-at-planning-p)) + (and (if (memq ts-type '(active inactive all)) + (eq (org-element-type (org-element-context)) 'timestamp) + (org-at-planning-p)) (time-less-p (org-time-string-to-time match) (org-time-string-to-time d))))))) @@ -17437,14 +17438,15 @@ both scheduled and deadline timestamps." (defun org-check-after-date (d) "Check if there are deadlines or scheduled entries after date D." (interactive (list (org-read-date))) - (let ((case-fold-search nil) - (regexp (org-re-timestamp org-ts-type)) - (callback - `(lambda () + (let* ((case-fold-search nil) + (regexp (org-re-timestamp org-ts-type)) + (ts-type org-ts-type) + (callback + (lambda () (let ((match (match-string 1))) - (and ,(if (memq org-ts-type '(active inactive all)) - '(eq (org-element-type (org-element-context)) 'timestamp) - '(org-at-planning-p)) + (and (if (memq ts-type '(active inactive all)) + (eq (org-element-type (org-element-context)) 'timestamp) + (org-at-planning-p)) (not (time-less-p (org-time-string-to-time match) (org-time-string-to-time d)))))))) |