Mercurial > emacs
comparison lisp/org/org-bbdb.el @ 102534:e4f58898be4a
m-v corrections.
author | Deepak Goel <deego@gnufans.org> |
---|---|
date | Fri, 13 Mar 2009 19:59:15 +0000 |
parents | 6d71fc980cde |
children | ac1a55cc2c38 |
comparison
equal
deleted
inserted
replaced
102533:f1bddbcb4b7e | 102534:e4f58898be4a |
---|---|
223 (error "No matching BBDB record"))))) | 223 (error "No matching BBDB record"))))) |
224 | 224 |
225 (defun org-bbdb-anniv-extract-date (time-str) | 225 (defun org-bbdb-anniv-extract-date (time-str) |
226 "Convert YYYY-MM-DD to (month date year). | 226 "Convert YYYY-MM-DD to (month date year). |
227 Argument TIME-STR is the value retrieved from BBDB." | 227 Argument TIME-STR is the value retrieved from BBDB." |
228 (multiple-value-bind (y m d) (bbdb-split time-str "-") | 228 (multiple-value-bind (y m d) (values-list (bbdb-split time-str "-")) |
229 (list (string-to-number m) | 229 (list (string-to-number m) |
230 (string-to-number d) | 230 (string-to-number d) |
231 (string-to-number y)))) | 231 (string-to-number y)))) |
232 | 232 |
233 (defun org-bbdb-anniv-split (str) | 233 (defun org-bbdb-anniv-split (str) |
256 rec org-bbdb-anniversary-field)) | 256 rec org-bbdb-anniversary-field)) |
257 (setq annivs (bbdb-split annivs "\n")) | 257 (setq annivs (bbdb-split annivs "\n")) |
258 (while annivs | 258 (while annivs |
259 (setq split (org-bbdb-anniv-split (pop annivs))) | 259 (setq split (org-bbdb-anniv-split (pop annivs))) |
260 (multiple-value-bind (m d y) | 260 (multiple-value-bind (m d y) |
261 (funcall org-bbdb-extract-date-fun (car split)) | 261 (values-list (funcall org-bbdb-extract-date-fun (car split))) |
262 (setq tmp (gethash (list m d) org-bbdb-anniv-hash)) | 262 (setq tmp (gethash (list m d) org-bbdb-anniv-hash)) |
263 (puthash (list m d) (cons (list y | 263 (puthash (list m d) (cons (list y |
264 (bbdb-record-name rec) | 264 (bbdb-record-name rec) |
265 (cadr split)) | 265 (cadr split)) |
266 tmp) | 266 tmp) |