changeset 24184:5b4ebdd66a82

(calendar-goto-islamic-date) (mark-islamic-diary-entries): 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:26:01 +0000
parents bee865220f54
children c8a68d6bcfa6
files lisp/calendar/cal-islam.el
diffstat 1 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-islam.el	Tue Jan 26 01:05:45 1999 +0000
+++ b/lisp/calendar/cal-islam.el	Tue Jan 26 01:26:01 1999 +0000
@@ -150,13 +150,12 @@
                     (calendar-absolute-from-gregorian today))))))
           (month-array calendar-islamic-month-name-array)
           (completion-ignore-case t)
-          (month (cdr (assoc
-                       (capitalize
+          (month (cdr (assoc-ignore-case
                         (completing-read
                          "Islamic calendar month name: "
                          (mapcar 'list (append month-array nil))
-                         nil t))
-                       (calendar-make-alist month-array 1 'capitalize))))
+                         nil t)
+                       (calendar-make-alist month-array 1))))
           (last (islamic-calendar-last-day-of-month month year))
           (day (calendar-read
                 (format "Islamic calendar day (1-%d): " last)
@@ -368,17 +367,17 @@
                          (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)
+                          (cdr (assoc-ignore-case
+                                mm-name
                                 (calendar-make-alist
                                   calendar-islamic-month-name-array))))))
               (mark-islamic-calendar-date-pattern mm dd yy)))))