Mercurial > emacs
comparison lisp/calendar/cal-hebrew.el @ 54074:ae72e69df10d
(calendar-goto-hebrew-date, mark-hebrew-diary-entries)
(list-yahrzeit-dates): Use assoc-string instead of assoc-ignore-case.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 19 Feb 2004 01:16:53 +0000 |
parents | 695cf19ef79e |
children | 7f7db25577d9 |
comparison
equal
deleted
inserted
replaced
54073:8061b3e9df12 | 54074:ae72e69df10d |
---|---|
234 (calendar-absolute-from-gregorian today)))))) | 234 (calendar-absolute-from-gregorian today)))))) |
235 (month-array (if (hebrew-calendar-leap-year-p year) | 235 (month-array (if (hebrew-calendar-leap-year-p year) |
236 calendar-hebrew-month-name-array-leap-year | 236 calendar-hebrew-month-name-array-leap-year |
237 calendar-hebrew-month-name-array-common-year)) | 237 calendar-hebrew-month-name-array-common-year)) |
238 (completion-ignore-case t) | 238 (completion-ignore-case t) |
239 (month (cdr (assoc-ignore-case | 239 (month (cdr (assoc-string |
240 (completing-read | 240 (completing-read |
241 "Hebrew calendar month name: " | 241 "Hebrew calendar month name: " |
242 (mapcar 'list (append month-array nil)) | 242 (mapcar 'list (append month-array nil)) |
243 (if (= year 3761) | 243 (if (= year 3761) |
244 '(lambda (x) | 244 '(lambda (x) |
245 (let ((m (cdr | 245 (let ((m (cdr |
246 (assoc-ignore-case | 246 (assoc-string |
247 (car x) | 247 (car x) |
248 (calendar-make-alist | 248 (calendar-make-alist month-array) |
249 month-array))))) | 249 t)))) |
250 (< 0 | 250 (< 0 |
251 (calendar-absolute-from-hebrew | 251 (calendar-absolute-from-hebrew |
252 (list m | 252 (list m |
253 (hebrew-calendar-last-day-of-month | 253 (hebrew-calendar-last-day-of-month |
254 m year) | 254 m year) |
255 year)))))) | 255 year)))))) |
256 t) | 256 t) |
257 (calendar-make-alist month-array 1)))) | 257 (calendar-make-alist month-array 1) t))) |
258 (last (hebrew-calendar-last-day-of-month month year)) | 258 (last (hebrew-calendar-last-day-of-month month year)) |
259 (first (if (and (= year 3761) (= month 10)) | 259 (first (if (and (= year 3761) (= month 10)) |
260 18 1)) | 260 18 1)) |
261 (day (calendar-read | 261 (day (calendar-read |
262 (format "Hebrew calendar day (%d-%d): " | 262 (format "Hebrew calendar day (%d-%d): " |
751 (+ y 100) | 751 (+ y 100) |
752 y))) | 752 y))) |
753 (string-to-int y-str))))) | 753 (string-to-int y-str))))) |
754 (if dd-name | 754 (if dd-name |
755 (mark-calendar-days-named | 755 (mark-calendar-days-named |
756 (cdr (assoc-ignore-case dd-name | 756 (cdr (assoc-string dd-name |
757 (calendar-make-alist | 757 (calendar-make-alist |
758 calendar-day-name-array | 758 calendar-day-name-array |
759 0 nil calendar-day-abbrev-array)))) | 759 0 nil calendar-day-abbrev-array) t))) |
760 (if mm-name | 760 (if mm-name |
761 (setq mm | 761 (setq mm |
762 (if (string-equal mm-name "*") 0 | 762 (if (string-equal mm-name "*") 0 |
763 (cdr | 763 (cdr |
764 (assoc-ignore-case | 764 (assoc-string |
765 mm-name | 765 mm-name |
766 (calendar-make-alist | 766 (calendar-make-alist |
767 calendar-hebrew-month-name-array-leap-year)))))) | 767 calendar-hebrew-month-name-array-leap-year) t))))) |
768 (mark-hebrew-calendar-date-pattern mm dd yy))))) | 768 (mark-hebrew-calendar-date-pattern mm dd yy))))) |
769 (setq d (cdr d))))) | 769 (setq d (cdr d))))) |
770 | 770 |
771 (defun insert-hebrew-diary-entry (arg) | 771 (defun insert-hebrew-diary-entry (arg) |
772 "Insert a diary entry. | 772 "Insert a diary entry. |
837 "Year of death (>0): " | 837 "Year of death (>0): " |
838 '(lambda (x) (> x 0)) | 838 '(lambda (x) (> x 0)) |
839 (int-to-string (extract-calendar-year today)))) | 839 (int-to-string (extract-calendar-year today)))) |
840 (month-array calendar-month-name-array) | 840 (month-array calendar-month-name-array) |
841 (completion-ignore-case t) | 841 (completion-ignore-case t) |
842 (month (cdr (assoc-ignore-case | 842 (month (cdr (assoc-string |
843 (completing-read | 843 (completing-read |
844 "Month of death (name): " | 844 "Month of death (name): " |
845 (mapcar 'list (append month-array nil)) | 845 (mapcar 'list (append month-array nil)) |
846 nil t) | 846 nil t) |
847 (calendar-make-alist month-array 1)))) | 847 (calendar-make-alist month-array 1) t))) |
848 (last (calendar-last-day-of-month month year)) | 848 (last (calendar-last-day-of-month month year)) |
849 (day (calendar-read | 849 (day (calendar-read |
850 (format "Day of death (1-%d): " last) | 850 (format "Day of death (1-%d): " last) |
851 '(lambda (x) (and (< 0 x) (<= x last)))))) | 851 '(lambda (x) (and (< 0 x) (<= x last)))))) |
852 (list month day year)))) | 852 (list month day year)))) |