2008-04-08 Glenn Morris <rgm@gnu.org>
+ * 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.
(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")