aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/textmodes/remember.el43
2 files changed, 28 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index beb9fe71e39..9e53db5f3aa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12008-04-08 Glenn Morris <rgm@gnu.org> 12008-04-08 Glenn Morris <rgm@gnu.org>
2 2
3 * calendar/calendar.el (calendar-date-style): Remove autoload cookie.
4 * textmodes/remember.el (remember-diary-convert-entry):
5 Require calendar.
6
3 * calendar/cal-menu.el (cal-menu-event-to-date): 7 * calendar/cal-menu.el (cal-menu-event-to-date):
4 Rename calendar-event-to-date. Update callers. 8 Rename calendar-event-to-date. Update callers.
5 (calendar-mouse-tex-day): Rename cal-tex-mouse-day. 9 (calendar-mouse-tex-day): Rename cal-tex-mouse-day.
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 1fd830afac7..e1c31f4a2b3 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -478,25 +478,30 @@ If this is nil, then `diary-file' will be used instead."
478 (when remember-annotation 478 (when remember-annotation
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 (progn
482 (let ((style (if (boundp 'calendar-date-style) 482 ;; For calendar-date-style. This costs us nothing because
483 calendar-date-style 483 ;; the call to make-diary-entry below loads diary-lib
484 ;; Don't complain about obsoleteness. 484 ;; which requires calendar.
485 (if (with-no-warnings european-calendar-style) 485 (require 'calendar)
486 'european 486 (replace-match
487 'american)))) 487 (let ((style (if (boundp 'calendar-date-style)
488 (cond ((eq style 'european) 488 calendar-date-style
489 (concat (match-string 3 entry) "/" 489 ;; Don't complain about obsoleteness.
490 (match-string 2 entry) "/" 490 (if (with-no-warnings european-calendar-style)
491 (match-string 1 entry))) 491 'european
492 ((eq style 'iso) 492 'american))))
493 (concat (match-string 1 entry) "-" 493 (cond ((eq style 'european)
494 (match-string 2 entry) "-" 494 (concat (match-string 3 entry) "/"
495 (match-string 3 entry))) 495 (match-string 2 entry) "/"
496 (t (concat (match-string 2 entry) "/" 496 (match-string 1 entry)))
497 (match-string 3 entry) "/" 497 ((eq style 'iso)
498 (match-string 1 entry))))) 498 (concat (match-string 1 entry) "-"
499 t t entry) 499 (match-string 2 entry) "-"
500 (match-string 3 entry)))
501 (t (concat (match-string 2 entry) "/"
502 (match-string 3 entry) "/"
503 (match-string 1 entry)))))
504 t t entry))
500 entry))) 505 entry)))
501 506
502(autoload 'make-diary-entry "diary-lib") 507(autoload 'make-diary-entry "diary-lib")