Mercurial > emacs
comparison lisp/calendar/calendar.el @ 54071:8089fbb082b9
(calendar-holidays): Doc fix.
(calendar-read-date): Use assoc-string rather than assoc-ignore-case.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 19 Feb 2004 01:13:56 +0000 |
parents | ba8b837c072c |
children | 520476f3222d |
comparison
equal
deleted
inserted
replaced
54070:e3c36780d566 | 54071:8089fbb082b9 |
---|---|
1162 To include a holiday conditionally, use the sexp form or a conditional. For | 1162 To include a holiday conditionally, use the sexp form or a conditional. For |
1163 example, to include American presidential elections, which occur on the first | 1163 example, to include American presidential elections, which occur on the first |
1164 Tuesday after the first Monday in November of years divisible by 4, add | 1164 Tuesday after the first Monday in November of years divisible by 4, add |
1165 | 1165 |
1166 (holiday-sexp | 1166 (holiday-sexp |
1167 (if (zerop (% year 4)) | 1167 '(if (zerop (% year 4)) |
1168 (calendar-gregorian-from-absolute | 1168 (calendar-gregorian-from-absolute |
1169 (1+ (calendar-dayname-on-or-before | 1169 (1+ (calendar-dayname-on-or-before |
1170 1 (+ 6 (calendar-absolute-from-gregorian | 1170 1 (+ 6 (calendar-absolute-from-gregorian |
1171 (list 11 1 year))))))) | 1171 (list 11 1 year))))))) |
1172 \"US Presidential Election\") | 1172 \"US Presidential Election\") |
2542 (lambda (x) (not (zerop x))) | 2542 (lambda (x) (not (zerop x))) |
2543 (int-to-string (extract-calendar-year | 2543 (int-to-string (extract-calendar-year |
2544 (calendar-current-date))))) | 2544 (calendar-current-date))))) |
2545 (month-array calendar-month-name-array) | 2545 (month-array calendar-month-name-array) |
2546 (completion-ignore-case t) | 2546 (completion-ignore-case t) |
2547 (month (cdr (assoc-ignore-case | 2547 (month (cdr (assoc-string |
2548 (completing-read | 2548 (completing-read |
2549 "Month name: " | 2549 "Month name: " |
2550 (mapcar 'list (append month-array nil)) | 2550 (mapcar 'list (append month-array nil)) |
2551 nil t) | 2551 nil t) |
2552 (calendar-make-alist month-array 1)))) | 2552 (calendar-make-alist month-array 1) t))) |
2553 (last (calendar-last-day-of-month month year))) | 2553 (last (calendar-last-day-of-month month year))) |
2554 (if noday | 2554 (if noday |
2555 (if (eq noday t) | 2555 (if (eq noday t) |
2556 (list month nil year) | 2556 (list month nil year) |
2557 (list month year)) | 2557 (list month year)) |