aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorGlenn Morris2008-03-29 02:45:02 +0000
committerGlenn Morris2008-03-29 02:45:02 +0000
commitd4c9e004911c7c133d0defa5838009fcb01fbce5 (patch)
tree40f38d56f0c66a400e0f34aeff28f189e78a9c30 /lisp/textmodes
parentf905ff0d8f2c548a308c1c37ae0679f926444f7a (diff)
downloademacs-d4c9e004911c7c133d0defa5838009fcb01fbce5.tar.gz
emacs-d4c9e004911c7c133d0defa5838009fcb01fbce5.zip
(remember-diary-convert-entry): Respect calendar-date-style if bound.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/remember.el23
1 files changed, 16 insertions, 7 deletions
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index b077f08f295..459bf5b7898 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -479,13 +479,22 @@ If this is nil, then `diary-file' will be used instead."
479 (setq entry (concat entry " " remember-annotation))) 479 (setq entry (concat entry " " remember-annotation)))
480 (if (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" entry) 480 (if (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" entry)
481 (replace-match 481 (replace-match
482 (if european-calendar-style 482 (let ((style (if (boundp 'calendar-date-style)
483 (concat (match-string 3 entry) "/" 483 calendar-date-style
484 (match-string 2 entry) "/" 484 (if (with-no-warnings european-calendar-style)
485 (match-string 1 entry)) 485 'european
486 (concat (match-string 2 entry) "/" 486 'american))))
487 (match-string 3 entry) "/" 487 (cond ((eq style 'european)
488 (match-string 1 entry))) 488 (concat (match-string 3 entry) "/"
489 (match-string 2 entry) "/"
490 (match-string 1 entry)))
491 ((eq style 'iso)
492 (concat (match-string 1 entry) "-"
493 (match-string 2 entry) "-"
494 (match-string 3 entry)))
495 (t (concat (match-string 2 entry) "/"
496 (match-string 3 entry) "/"
497 (match-string 1 entry)))))
489 t t entry) 498 t t entry)
490 entry))) 499 entry)))
491 500