changeset 24187:cc07d0f935d4

(calendar-goto-hebrew-date) (mark-hebrew-diary-entries, list-yahrzeit-dates): Use assoc-ignore-case and do not capitalize when matching month and day names.
author Richard M. Stallman <rms@gnu.org>
date Tue, 26 Jan 1999 01:28:41 +0000
parents 8aae7db1922c
children 94db9f395842
files lisp/calendar/cal-hebrew.el
diffstat 1 files changed, 35 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-hebrew.el	Tue Jan 26 01:27:39 1999 +0000
+++ b/lisp/calendar/cal-hebrew.el	Tue Jan 26 01:28:41 1999 +0000
@@ -231,27 +231,25 @@
                            calendar-hebrew-month-name-array-leap-year
                          calendar-hebrew-month-name-array-common-year))
           (completion-ignore-case t)
-          (month (cdr (assoc
-                       (capitalize
-                        (completing-read
-                         "Hebrew calendar month name: "
-                         (mapcar 'list (append month-array nil))
-                         (if (= year 3761)
-                             '(lambda (x)
-                                (let ((m (cdr
-                                          (assoc
-                                           (car x)
-                                           (calendar-make-alist
-                                            month-array)))))
-                                  (< 0
-                                     (calendar-absolute-from-hebrew
-                                      (list m
-                                            (hebrew-calendar-last-day-of-month
-                                             m year)
-                                            year))))))
-                                 
-                         t))
-                       (calendar-make-alist month-array 1 'capitalize))))
+          (month (cdr (assoc-ignore-case
+                       (completing-read
+                        "Hebrew calendar month name: "
+                        (mapcar 'list (append month-array nil))
+                        (if (= year 3761)
+                            '(lambda (x)
+                               (let ((m (cdr
+                                         (assoc-ignore-case
+                                          (car x)
+                                          (calendar-make-alist
+                                           month-array)))))
+                                 (< 0
+                                    (calendar-absolute-from-hebrew
+                                     (list m
+                                           (hebrew-calendar-last-day-of-month
+                                            m year)
+                                           year))))))
+                        t)
+                       (calendar-make-alist month-array 1))))
           (last (hebrew-calendar-last-day-of-month month year))
           (first (if (and (= year 3761) (= month 10))
                      18 1))
@@ -674,21 +672,22 @@
                          (string-to-int y-str)))))
             (if dd-name
                 (mark-calendar-days-named
-                 (cdr (assoc (capitalize (substring dd-name 0 3))
-                             (calendar-make-alist
-                               calendar-day-name-array
-                               0
-                              '(lambda (x) (substring x 0 3))))))
+                 (cdr (assoc-ignore-case
+                       (substring dd-name 0 3)
+                       (calendar-make-alist
+                        calendar-day-name-array
+                        0
+                        '(lambda (x) (substring x 0 3))))))
               (if mm-name
                   (if (string-equal mm-name "*")
                       (setq mm 0)
                     (setq
                       mm
                       (cdr 
-                        (assoc
-                          (capitalize mm-name)
-                            (calendar-make-alist
-                               calendar-hebrew-month-name-array-leap-year))))))
+                        (assoc-ignore-case
+                         mm-name
+                         (calendar-make-alist
+                          calendar-hebrew-month-name-array-leap-year))))))
               (mark-hebrew-calendar-date-pattern mm dd yy)))))
       (setq d (cdr d)))))
 
@@ -837,14 +836,12 @@
                            (int-to-string (extract-calendar-year today))))
                     (month-array calendar-month-name-array)
                     (completion-ignore-case t)
-                    (month (cdr (assoc
-                                 (capitalize
-                                  (completing-read
-                                   "Month of death (name): "
-                                   (mapcar 'list (append month-array nil))
-                                   nil t))
-                                 (calendar-make-alist
-                                  month-array 1 'capitalize))))
+                    (month (cdr (assoc-ignore-case
+                                 (completing-read
+                                  "Month of death (name): "
+                                  (mapcar 'list (append month-array nil))
+                                  nil t)
+                                 (calendar-make-alist month-array 1))))
                     (last (calendar-last-day-of-month month year))
                     (day (calendar-read
                           (format "Day of death (1-%d): " last)