emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'.
@ 2013-03-03 14:08 Rüdiger Sonderfeld
  2013-03-03 16:53 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Rüdiger Sonderfeld @ 2013-03-03 14:08 UTC (permalink / raw)
  To: emacs-orgmode

* 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 e4cebbe40.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
---
 contrib/lisp/org-contacts.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 4ffe360..d849e7f 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/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 specification:
   (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 org-contacts-birthday-property)
                                          (caddr contact)))))
-- 
1.8.1.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-03 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03 14:08 [PATCH] orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries' Rüdiger Sonderfeld
2013-03-03 16:53 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).