;; Thomas Baumann <thomas dot baumann at ch dot tum dot de>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 6.05a
+;; Version: 6.15a
;;
;; This file is part of GNU Emacs.
;;
(multiple-value-bind (m d y)
(funcall org-bbdb-extract-date-fun (car split))
(setq tmp (gethash (list m d) org-bbdb-anniv-hash))
- (puthash (list m d) (cons (list y
- (bbdb-record-name rec)
+ (puthash (list m d) (cons (list y
+ (bbdb-record-name rec)
(cadr split))
tmp)
org-bbdb-anniv-hash))))))
;;;###autoload
(defun org-bbdb-anniversaries()
"Extract anniversaries from BBDB for display in the agenda."
+ (require 'bbdb)
(require 'diary-lib)
(unless (hash-table-p org-bbdb-anniv-hash)
(setq org-bbdb-anniv-hash
(y (nth 2 date)) ; year
(annivs (gethash (list m d) org-bbdb-anniv-hash))
(text ())
- split class form rec)
-
+ split class form rec recs)
+
;; we don't want to miss people born on Feb. 29th
- (when (and (= m 3) (= d 1) (not (calendar-leap-year-p y)))
- (setq annivs (cons annivs (gethash (list 2 29) org-bbdb-anniv-hash))))
+ (when (and (= m 3) (= d 1)
+ (not (null (gethash (list 2 29) org-bbdb-anniv-hash)))
+ (not (calendar-leap-year-p y)))
+ (setq recs (gethash (list 2 29) org-bbdb-anniv-hash))
+ (while (setq rec (pop recs))
+ (push rec annivs)))
(when annivs
(while (setq rec (pop annivs))
- (when rec
+ (when rec
(let* ((class (or (nth 2 rec)
org-bbdb-default-anniversary-format))
(form (or (cdr (assoc class