From: Edward M. Reingold Date: Tue, 1 Mar 1994 22:42:53 +0000 (+0000) Subject: * calendar.el (calendar-current-date): Use fixed assoc list for X-Git-Tag: emacs-19.34~9728 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b5e8c6b79df9b4e1608b26d58d4ee3b461340ad9;p=emacs.git * calendar.el (calendar-current-date): Use fixed assoc list for month names so that changing the array of names doesn't screw up the determination of the current date. --- diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 8aefa785b80..74d1c52e0a1 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1932,10 +1932,9 @@ If in the calendar buffer, also sets the current date local variables." (month (cdr (assoc (substring date (match-beginning 2) (match-end 2)) - (calendar-make-alist - calendar-month-name-array - 1 - '(lambda (x) (substring x 0 3)))))) + '(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) + ("May" . 5) ("Jun" . 6) ("Jul" . 7) ("Aug" . 8) + ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) ("Dec" . 12))))) (day (string-to-int (substring date (match-beginning 3) (match-end 3)))) (year