orgcontacts.el: Fix date' being broken in
org-contacts-anniversaries'.
* contrib/lisp/org-contacts.el: Add defvar for date. Similar to org.el.
(org-contacts-anniversaries): Setting date to nil breaks the
function. Bug was introduced in 680dc1f24
.
Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
This commit is contained in:
parent
b34f505d38
commit
fb5c9dcec9
1 changed files with 2 additions and 2 deletions
|
@ -499,6 +499,7 @@ A group FOO is composed of contacts with the tag FOO."
|
||||||
;; show the next heading
|
;; show the next heading
|
||||||
(org-flag-heading nil)))))))
|
(org-flag-heading nil)))))))
|
||||||
|
|
||||||
|
(org-no-warnings (defvar date)) ;; unprefixed, from calendar.el
|
||||||
(defun org-contacts-anniversaries (&optional field format)
|
(defun org-contacts-anniversaries (&optional field format)
|
||||||
"Compute FIELD anniversary for each contact, returning FORMAT.
|
"Compute FIELD anniversary for each contact, returning FORMAT.
|
||||||
Default FIELD value is \"BIRTHDAY\".
|
Default FIELD value is \"BIRTHDAY\".
|
||||||
|
@ -512,8 +513,7 @@ Format is a string matching the following format specification:
|
||||||
(let ((calendar-date-style 'american)
|
(let ((calendar-date-style 'american)
|
||||||
(entry ""))
|
(entry ""))
|
||||||
(unless format (setq format org-contacts-birthday-format))
|
(unless format (setq format org-contacts-birthday-format))
|
||||||
(loop with date = nil ; FIXME: prevent a warning
|
(loop for contact in (org-contacts-filter)
|
||||||
for contact in (org-contacts-filter)
|
|
||||||
for anniv = (let ((anniv (cdr (assoc-string
|
for anniv = (let ((anniv (cdr (assoc-string
|
||||||
(or field org-contacts-birthday-property)
|
(or field org-contacts-birthday-property)
|
||||||
(caddr contact)))))
|
(caddr contact)))))
|
||||||
|
|
Loading…
Reference in a new issue