From: Glenn Morris Date: Tue, 8 Apr 2008 07:36:03 +0000 (+0000) Subject: (remember-diary-convert-entry): Require calendar. X-Git-Tag: emacs-pretest-23.0.90~6445 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f651ee61bc1e8ea25890d7d9b1118d5609a4256;p=emacs.git (remember-diary-convert-entry): Require calendar. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index beb9fe71e39..9e53db5f3aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2008-04-08 Glenn Morris + * calendar/calendar.el (calendar-date-style): Remove autoload cookie. + * textmodes/remember.el (remember-diary-convert-entry): + Require calendar. + * calendar/cal-menu.el (cal-menu-event-to-date): Rename calendar-event-to-date. Update callers. (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." (when remember-annotation (setq entry (concat entry " " remember-annotation))) (if (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" entry) - (replace-match - (let ((style (if (boundp 'calendar-date-style) - calendar-date-style - ;; Don't complain about obsoleteness. - (if (with-no-warnings european-calendar-style) - 'european - 'american)))) - (cond ((eq style 'european) - (concat (match-string 3 entry) "/" - (match-string 2 entry) "/" - (match-string 1 entry))) - ((eq style 'iso) - (concat (match-string 1 entry) "-" - (match-string 2 entry) "-" - (match-string 3 entry))) - (t (concat (match-string 2 entry) "/" - (match-string 3 entry) "/" - (match-string 1 entry))))) - t t entry) + (progn + ;; For calendar-date-style. This costs us nothing because + ;; the call to make-diary-entry below loads diary-lib + ;; which requires calendar. + (require 'calendar) + (replace-match + (let ((style (if (boundp 'calendar-date-style) + calendar-date-style + ;; Don't complain about obsoleteness. + (if (with-no-warnings european-calendar-style) + 'european + 'american)))) + (cond ((eq style 'european) + (concat (match-string 3 entry) "/" + (match-string 2 entry) "/" + (match-string 1 entry))) + ((eq style 'iso) + (concat (match-string 1 entry) "-" + (match-string 2 entry) "-" + (match-string 3 entry))) + (t (concat (match-string 2 entry) "/" + (match-string 3 entry) "/" + (match-string 1 entry))))) + t t entry)) entry))) (autoload 'make-diary-entry "diary-lib")