[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] scratch/org-contacts-rebased 15f35f7 040/118: orgcontacts.el: Fix

From: Stefan Monnier
Subject: [elpa] scratch/org-contacts-rebased 15f35f7 040/118: orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'.
Date: Fri, 12 Nov 2021 15:37:00 -0500 (EST)

branch: scratch/org-contacts-rebased
commit 15f35f788de2af9e33efde48b7e055e649406895
Author: RĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
Commit: Bastien Guerry <bzg@altern.org>

    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 e86b83d31.
    Signed-off-by: RĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
 org-contacts.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index 4ffe360..d849e7f 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -499,6 +499,7 @@ A group FOO is composed of contacts with the tag FOO."
                ;; show the next heading
                (org-flag-heading nil)))))))
+(org-no-warnings (defvar date)) ;; unprefixed, from calendar.el
 (defun org-contacts-anniversaries (&optional field format)
   "Compute FIELD anniversary for each contact, returning FORMAT.
 Default FIELD value is \"BIRTHDAY\".
@@ -512,8 +513,7 @@ Format is a string matching the following format 
   (let ((calendar-date-style 'american)
         (entry ""))
     (unless format (setq format org-contacts-birthday-format))
-    (loop with date = nil              ; FIXME: prevent a warning
-         for contact in (org-contacts-filter)
+    (loop for contact in (org-contacts-filter)
           for anniv = (let ((anniv (cdr (assoc-string
                                          (or field 
                                          (caddr contact)))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]