Mercurial > emacs
annotate lisp/calendar/holidays.el @ 108635:e565448628b8
Set rallocobj with configure, not cpp.
* configure.in (REL_ALLOC): Unset on gnu, gnu-linux if DOUG_LEA_MALLOC.
(RALLOC_OBJ): New output variable.
* config.bat (RALLOC_OBJ): Edit to empty if sys_malloc.
* src/Makefile.in (RALLOC_OBJ): New, set by configure.
(rallocobj): Replace with the previous variable.
(otherobj): Use $RALLOC_OBJ.
* src/s/gnu.h (REL_ALLOC) [DOUG_LEA_MALLOC]:
* src/s/gnu-linux.h (REL_ALLOC) [DOUG_LEA_MALLOC]: Move undef to configure.
* msdos/sed1v2.inp (RALLOC_OBJ): Edit to ralloc.o.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 17 May 2010 19:44:07 -0700 |
parents | 1d1d5d9bd884 |
children | 280c8ae2476d 376148b31b5e |
rev | line source |
---|---|
660
08eb386dd0f3
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
584
diff
changeset
|
1 ;;; holidays.el --- holiday functions for the calendar package |
793
6fb68a1460a6
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
778
diff
changeset
|
2 |
67465
a55ee709ec8d
Update copyright pending Emacs 22.
Glenn Morris <rgm@gnu.org>
parents:
65919
diff
changeset
|
3 ;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1997, 2001, 2002, 2003, |
106815 | 4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
846
20674ae6bf52
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
811
diff
changeset
|
5 |
793
6fb68a1460a6
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
778
diff
changeset
|
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> |
65919
5c09efcfc1d9
Update maintainer email address.
Glenn Morris <rgm@gnu.org>
parents:
64085
diff
changeset
|
7 ;; Maintainer: Glenn Morris <rgm@gnu.org> |
957 | 8 ;; Keywords: holidays, calendar |
793
6fb68a1460a6
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
778
diff
changeset
|
9 |
406 | 10 ;; This file is part of GNU Emacs. |
11 | |
94653
e49abd957e81
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94456
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
6736
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5831
diff
changeset
|
13 ;; it under the terms of the GNU General Public License as published by |
94653
e49abd957e81
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94456
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
e49abd957e81
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94456
diff
changeset
|
15 ;; (at your option) any later version. |
3870
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
16 |
406 | 17 ;; GNU Emacs is distributed in the hope that it will be useful, |
6736
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5831
diff
changeset
|
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5831
diff
changeset
|
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5831
diff
changeset
|
20 ;; GNU General Public License for more details. |
406 | 21 |
6736
3e1323443b1a
Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents:
5831
diff
changeset
|
22 ;; You should have received a copy of the GNU General Public License |
94653
e49abd957e81
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94456
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
406 | 24 |
793
6fb68a1460a6
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
778
diff
changeset
|
25 ;;; Commentary: |
6fb68a1460a6
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
778
diff
changeset
|
26 |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
27 ;; See calendar.el. |
406 | 28 |
793
6fb68a1460a6
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
778
diff
changeset
|
29 ;;; Code: |
6fb68a1460a6
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
778
diff
changeset
|
30 |
406 | 31 (require 'calendar) |
105933
8f110099da5c
Update x-popup-menu declaration.
Glenn Morris <rgm@gnu.org>
parents:
105870
diff
changeset
|
32 (load "hol-loaddefs" nil t) |
957 | 33 |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
34 (defgroup holidays nil |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
35 "Holidays support in calendar." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
36 :group 'calendar |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
37 :prefix "holidays-" |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
38 :group 'local) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
39 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
40 ;; The various holiday variables are autoloaded because people |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
41 ;; are used to using them to set calendar-holidays without having to |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
42 ;; explicitly load this file. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
43 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
44 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
45 (defcustom holiday-general-holidays |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
46 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
47 '((holiday-fixed 1 1 "New Year's Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
48 (holiday-float 1 1 3 "Martin Luther King Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
49 (holiday-fixed 2 2 "Groundhog Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
50 (holiday-fixed 2 14 "Valentine's Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
51 (holiday-float 2 1 3 "President's Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
52 (holiday-fixed 3 17 "St. Patrick's Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
53 (holiday-fixed 4 1 "April Fools' Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
54 (holiday-float 5 0 2 "Mother's Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
55 (holiday-float 5 1 -1 "Memorial Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
56 (holiday-fixed 6 14 "Flag Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
57 (holiday-float 6 0 3 "Father's Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
58 (holiday-fixed 7 4 "Independence Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
59 (holiday-float 9 1 1 "Labor Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
60 (holiday-float 10 1 2 "Columbus Day") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
61 (holiday-fixed 10 31 "Halloween") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
62 (holiday-fixed 11 11 "Veteran's Day") |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
63 (holiday-float 11 4 4 "Thanksgiving"))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
64 "General holidays. Default value is for the United States. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
65 See the documentation for `calendar-holidays' for details." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
66 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
67 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
68 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
69 (put 'holiday-general-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
70 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
71 (define-obsolete-variable-alias 'general-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
72 'holiday-general-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
73 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
74 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
75 (defcustom holiday-oriental-holidays |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
76 (mapcar 'purecopy |
94281
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
77 '((holiday-chinese-new-year) |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
78 (if calendar-chinese-all-holidays-flag |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
79 (append |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
80 (holiday-chinese 1 15 "Lantern Festival") |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
81 (holiday-chinese-qingming) |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
82 (holiday-chinese 5 5 "Dragon Boat Festival") |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
83 (holiday-chinese 7 7 "Double Seventh Festival") |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
84 (holiday-chinese 8 15 "Mid-Autumn Festival") |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
85 (holiday-chinese 9 9 "Double Ninth Festival") |
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
86 (holiday-chinese-winter-solstice) |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
87 )))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
88 "Oriental holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
89 See the documentation for `calendar-holidays' for details." |
94281
0cbedba0ce0d
(holiday-oriental-holidays): Add more holidays.
Glenn Morris <rgm@gnu.org>
parents:
93996
diff
changeset
|
90 :version "23.1" ; added more holidays |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
91 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
92 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
93 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
94 (put 'holiday-oriental-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
95 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
96 (define-obsolete-variable-alias 'oriental-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
97 'holiday-oriental-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
98 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
99 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
100 (defcustom holiday-local-holidays nil |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
101 "Local holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
102 See the documentation for `calendar-holidays' for details." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
103 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
104 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
105 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
106 (put 'holiday-local-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
107 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
108 (define-obsolete-variable-alias 'local-holidays 'holiday-local-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
109 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
110 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
111 (defcustom holiday-other-holidays nil |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
112 "User defined holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
113 See the documentation for `calendar-holidays' for details." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
114 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
115 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
116 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
117 (put 'holiday-other-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
118 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
119 (define-obsolete-variable-alias 'other-holidays 'holiday-other-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
120 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
121 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
122 (defvar hebrew-holidays-1 |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
123 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
124 '((holiday-hebrew-rosh-hashanah) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
125 (if calendar-hebrew-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
126 (holiday-julian |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
127 11 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
128 (let ((m displayed-month) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
129 (y displayed-year) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
130 year) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
131 (calendar-increment-month m y -1) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
132 (setq year (calendar-extract-year |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
133 (calendar-julian-from-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
134 (calendar-absolute-from-gregorian (list m 1 y))))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
135 (if (zerop (% (1+ year) 4)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
136 22 |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
137 21)) "\"Tal Umatar\" (evening)")))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
138 "Component of the old default value of `holiday-hebrew-holidays'.") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
139 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
140 (put 'hebrew-holidays-1 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
141 (make-obsolete-variable 'hebrew-holidays-1 'hebrew-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
142 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
143 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
144 (defvar hebrew-holidays-2 |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
145 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
146 '((holiday-hebrew-hanukkah) ; respects calendar-hebrew-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
147 (if calendar-hebrew-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
148 (holiday-hebrew |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
149 10 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
150 (let ((h-year (calendar-extract-year |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
151 (calendar-hebrew-from-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
152 (calendar-absolute-from-gregorian |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
153 (list displayed-month 28 displayed-year)))))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
154 (if (= 6 (% (calendar-hebrew-to-absolute (list 10 10 h-year)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
155 7)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
156 11 10)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
157 "Tzom Teveth")) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
158 (if calendar-hebrew-all-holidays-flag |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
159 (holiday-hebrew 11 15 "Tu B'Shevat")))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
160 "Component of the old default value of `holiday-hebrew-holidays'.") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
161 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
162 (put 'hebrew-holidays-2 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
163 (make-obsolete-variable 'hebrew-holidays-2 'hebrew-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
164 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
165 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
166 (defvar hebrew-holidays-3 |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
167 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
168 '((if calendar-hebrew-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
169 (holiday-hebrew |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
170 11 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
171 (let* ((m displayed-month) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
172 (y displayed-year) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
173 (h-year (progn |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
174 (calendar-increment-month m y 1) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
175 (calendar-extract-year |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
176 (calendar-hebrew-from-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
177 (calendar-absolute-from-gregorian |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
178 (list m (calendar-last-day-of-month m y) y)))))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
179 (s-s |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
180 (calendar-hebrew-from-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
181 (if (= 6 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
182 (% (calendar-hebrew-to-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
183 (list 7 1 h-year)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
184 7)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
185 (calendar-dayname-on-or-before |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
186 6 (calendar-hebrew-to-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
187 (list 11 17 h-year))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
188 (calendar-dayname-on-or-before |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
189 6 (calendar-hebrew-to-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
190 (list 11 16 h-year)))))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
191 (day (calendar-extract-day s-s))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
192 day) |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
193 "Shabbat Shirah")))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
194 "Component of the old default value of `holiday-hebrew-holidays'.") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
195 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
196 (put 'hebrew-holidays-3 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
197 (make-obsolete-variable 'hebrew-holidays-3 'hebrew-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
198 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
199 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
200 (defvar hebrew-holidays-4 |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
201 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
202 '((holiday-hebrew-passover) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
203 (and calendar-hebrew-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
204 (let* ((m displayed-month) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
205 (y displayed-year) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
206 (year (progn |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
207 (calendar-increment-month m y -1) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
208 (calendar-extract-year |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
209 (calendar-julian-from-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
210 (calendar-absolute-from-gregorian (list m 1 y))))))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
211 (= 21 (% year 28))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
212 (holiday-julian 3 26 "Kiddush HaHamah")) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
213 (if calendar-hebrew-all-holidays-flag |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
214 (holiday-hebrew-tisha-b-av)))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
215 "Component of the old default value of `holiday-hebrew-holidays'.") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
216 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
217 (put 'hebrew-holidays-4 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
218 (make-obsolete-variable 'hebrew-holidays-4 'hebrew-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
219 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
220 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
221 (defcustom holiday-hebrew-holidays |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
222 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
223 '((holiday-hebrew-passover) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
224 (holiday-hebrew-rosh-hashanah) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
225 (holiday-hebrew-hanukkah) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
226 (if calendar-hebrew-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
227 (append |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
228 (holiday-hebrew-tisha-b-av) |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
229 (holiday-hebrew-misc))))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
230 "Jewish holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
231 See the documentation for `calendar-holidays' for details." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
232 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
233 :version "23.1" ; removed dependency on hebrew-holidays-N |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
234 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
235 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
236 (put 'holiday-hebrew-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
237 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
238 (define-obsolete-variable-alias 'hebrew-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
239 'holiday-hebrew-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
240 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
241 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
242 (defcustom holiday-christian-holidays |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
243 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
244 '((holiday-easter-etc) ; respects calendar-christian-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
245 (holiday-fixed 12 25 "Christmas") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
246 (if calendar-christian-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
247 (append |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
248 (holiday-fixed 1 6 "Epiphany") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
249 (holiday-julian 12 25 "Eastern Orthodox Christmas") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
250 (holiday-greek-orthodox-easter) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
251 (holiday-fixed 8 15 "Assumption") |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
252 (holiday-advent 0 "Advent"))))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
253 "Christian holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
254 See the documentation for `calendar-holidays' for details." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
255 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
256 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
257 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
258 (put 'holiday-christian-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
259 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
260 (define-obsolete-variable-alias 'christian-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
261 'holiday-christian-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
262 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
263 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
264 (defcustom holiday-islamic-holidays |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
265 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
266 '((holiday-islamic-new-year) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
267 (holiday-islamic 9 1 "Ramadan Begins") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
268 (if calendar-islamic-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
269 (append |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
270 (holiday-islamic 1 10 "Ashura") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
271 (holiday-islamic 3 12 "Mulad-al-Nabi") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
272 (holiday-islamic 7 26 "Shab-e-Mi'raj") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
273 (holiday-islamic 8 15 "Shab-e-Bara't") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
274 (holiday-islamic 9 27 "Shab-e Qadr") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
275 (holiday-islamic 10 1 "Id-al-Fitr") |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
276 (holiday-islamic 12 10 "Id-al-Adha"))))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
277 "Islamic holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
278 See the documentation for `calendar-holidays' for details." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
279 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
280 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
281 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
282 (put 'holiday-islamic-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
283 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
284 (define-obsolete-variable-alias 'islamic-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
285 'holiday-islamic-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
286 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
287 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
288 (defcustom holiday-bahai-holidays |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
289 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
290 '((holiday-bahai-new-year) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
291 (holiday-bahai-ridvan) ; respects calendar-bahai-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
292 (holiday-fixed 5 23 "Declaration of the Bab") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
293 (holiday-fixed 5 29 "Ascension of Baha'u'llah") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
294 (holiday-fixed 7 9 "Martyrdom of the Bab") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
295 (holiday-fixed 10 20 "Birth of the Bab") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
296 (holiday-fixed 11 12 "Birth of Baha'u'llah") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
297 (if calendar-bahai-all-holidays-flag |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
298 (append |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
299 (holiday-fixed 11 26 "Day of the Covenant") |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
300 (holiday-fixed 11 28 "Ascension of `Abdu'l-Baha"))))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
301 "Baha'i holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
302 See the documentation for `calendar-holidays' for details." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
303 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
304 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
305 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
306 (put 'holiday-bahai-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
307 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
308 (define-obsolete-variable-alias 'bahai-holidays 'holiday-bahai-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
309 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
310 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
311 (defcustom holiday-solar-holidays |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
312 (mapcar 'purecopy |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
313 '((solar-equinoxes-solstices) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
314 (holiday-sexp calendar-daylight-savings-starts |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
315 (format "Daylight Saving Time Begins %s" |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
316 (solar-time-string |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
317 (/ calendar-daylight-savings-starts-time (float 60)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
318 calendar-standard-time-zone-name))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
319 (holiday-sexp calendar-daylight-savings-ends |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
320 (format "Daylight Saving Time Ends %s" |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
321 (solar-time-string |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
322 (/ calendar-daylight-savings-ends-time (float 60)) |
105870
26baacb565b0
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
105844
diff
changeset
|
323 calendar-daylight-time-zone-name))))) |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
324 "Sun-related holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
325 See the documentation for `calendar-holidays' for details." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
326 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
327 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
328 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
329 (put 'holiday-solar-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
330 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
331 (define-obsolete-variable-alias 'solar-holidays 'holiday-solar-holidays "23.1") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
332 |
102819
6cae903fcecf
(calendar-holidays): Don't autoload it. (Bug#2811)
Glenn Morris <rgm@gnu.org>
parents:
101083
diff
changeset
|
333 ;; This one should not be autoloaded, else .emacs changes of |
6cae903fcecf
(calendar-holidays): Don't autoload it. (Bug#2811)
Glenn Morris <rgm@gnu.org>
parents:
101083
diff
changeset
|
334 ;; holiday-general-holidays etc have no effect. |
6cae903fcecf
(calendar-holidays): Don't autoload it. (Bug#2811)
Glenn Morris <rgm@gnu.org>
parents:
101083
diff
changeset
|
335 ;; FIXME should have some :set-after. |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
336 (defcustom calendar-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
337 (append holiday-general-holidays holiday-local-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
338 holiday-other-holidays holiday-christian-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
339 holiday-hebrew-holidays holiday-islamic-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
340 holiday-bahai-holidays holiday-oriental-holidays |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
341 holiday-solar-holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
342 "List of notable days for the command \\[holidays]. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
343 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
344 Additional holidays are easy to add to the list, just put them in the |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
345 list `holiday-other-holidays' in your .emacs file. Similarly, by setting |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
346 any of `holiday-general-holidays', `holiday-local-holidays', |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
347 `holiday-christian-holidays', `holiday-hebrew-holidays', |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
348 `holiday-islamic-holidays', `holiday-bahai-holidays', |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
349 `holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
350 .emacs file, you can eliminate unwanted categories of holidays. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
351 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
352 The aforementioned variables control the holiday choices offered |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
353 by the function `holiday-list' when it is called interactively. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
354 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
355 They also initialize the default value of `calendar-holidays', |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
356 which is the default list of holidays used by the function |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
357 `holiday-list' in the non-interactive case. Note that these |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
358 variables have no effect on `calendar-holidays' after it has been |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
359 set (e.g. after the calendar is loaded). In that case, customize |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
360 `calendar-holidays' directly. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
361 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
362 The intention is that (in the US) `holiday-local-holidays' be set in |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
363 site-init.el and `holiday-other-holidays' be set by the user. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
364 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
365 Entries on the list are expressions that return (possibly empty) lists of |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
366 items of the form ((month day year) string) of a holiday in the |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
367 three-month period centered around `displayed-month' of `displayed-year'. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
368 Several basic functions are provided for this purpose: |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
369 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
370 (holiday-fixed MONTH DAY STRING) is a fixed date on the Gregorian calendar |
97722 | 371 (holiday-float MONTH DAYNAME K STRING &optional DAY) is the Kth DAYNAME |
372 (0 for Sunday, etc.) after/before Gregorian | |
373 MONTH DAY. K<0 means count back from the end | |
374 of the month. Optional DAY defaults to 1 if | |
375 K>0, and MONTH's last day otherwise. | |
93996
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
376 (holiday-hebrew MONTH DAY STRING) a fixed date on the Hebrew calendar |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
377 (holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
378 (holiday-bahai MONTH DAY STRING) a fixed date on the Baha'i calendar |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
379 (holiday-julian MONTH DAY STRING) a fixed date on the Julian calendar |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
380 (holiday-sexp SEXP STRING) SEXP is a Gregorian-date-valued expression |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
381 in the variable `year'; if it evaluates to |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
382 a visible date, that's the holiday; if it |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
383 evaluates to nil, there's no holiday. STRING |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
384 is an expression in the variable `date'. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
385 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
386 For example, to add Bastille Day, celebrated in France on July 14, add |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
387 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
388 (holiday-fixed 7 14 \"Bastille Day\") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
389 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
390 to the list. To add Hurricane Supplication Day, celebrated in the Virgin |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
391 Islands on the fourth Monday in August, add |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
392 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
393 (holiday-float 8 1 4 \"Hurricane Supplication Day\") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
394 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
395 to the list (the last Monday would be specified with `-1' instead of `4'). |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
396 To add the last day of Hanukkah to the list, use |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
397 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
398 (holiday-hebrew 10 2 \"Last day of Hanukkah\") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
399 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
400 since the Hebrew months are numbered with 1 starting from Nisan. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
401 To add the Islamic feast celebrating Mohammed's birthday, use |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
402 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
403 (holiday-islamic 3 12 \"Mohammed's Birthday\") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
404 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
405 since the Islamic months are numbered from 1 starting with Muharram. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
406 To add an entry for the Baha'i festival of Ridvan, use |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
407 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
408 (holiday-bahai 2 13 \"Festival of Ridvan\") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
409 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
410 since the Baha'i months are numbered from 1 starting with Baha. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
411 To add Thomas Jefferson's birthday, April 2, 1743 (Julian), use |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
412 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
413 (holiday-julian 4 2 \"Jefferson's Birthday\") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
414 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
415 To include a holiday conditionally, use the sexp form or a conditional. For |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
416 example, to include American presidential elections, which occur on the first |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
417 Tuesday after the first Monday in November of years divisible by 4, add |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
418 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
419 (holiday-sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
420 '(if (zerop (% year 4)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
421 (calendar-gregorian-from-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
422 (1+ (calendar-dayname-on-or-before |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
423 1 (+ 6 (calendar-absolute-from-gregorian |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
424 (list 11 1 year))))))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
425 \"US Presidential Election\") |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
426 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
427 or |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
428 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
429 (if (zerop (% displayed-year 4)) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
430 (holiday-fixed 11 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
431 (calendar-extract-day |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
432 (calendar-gregorian-from-absolute |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
433 (1+ (calendar-dayname-on-or-before |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
434 1 (+ 6 (calendar-absolute-from-gregorian |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
435 (list 11 1 displayed-year))))))) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
436 \"US Presidential Election\")) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
437 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
438 to the list. To include the phases of the moon, add |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
439 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
440 (lunar-phases) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
441 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
442 to the holiday list, where `lunar-phases' is an Emacs-Lisp function that |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
443 you've written to return a (possibly empty) list of the relevant VISIBLE dates |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
444 with descriptive strings such as |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
445 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
446 (((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... )." |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
447 :type 'sexp |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
448 :group 'holidays) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
449 ;;;###autoload |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
450 (put 'calendar-holidays 'risky-local-variable t) |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
451 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
452 ;;; End of user options. |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
453 |
d76c0fd8ef0c
(holidays): Move custom groups here from calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
454 |
93844
bf9ef749c23e
Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents:
93809
diff
changeset
|
455 ;; FIXME name that makes sense |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
456 ;;;###diary-autoload |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
457 (defun calendar-holiday-list () |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
458 "Form the list of holidays that occur on dates in the calendar window. |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
459 The holidays are those in the list `calendar-holidays'." |
93580
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
460 (let (res h) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
461 (sort |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
462 (dolist (p calendar-holidays res) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
463 (if (setq h (if calendar-debug-sexp |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
464 (let ((stack-trace-on-error t)) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
465 (eval p)) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
466 (condition-case nil |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
467 (eval p) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
468 (error (beep) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
469 (message "Bad holiday list item: %s" p) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
470 (sleep-for 2))))) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
471 (setq res (append h res)))) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
472 'calendar-date-compare))) |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
473 |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
474 (defvar displayed-month) ; from calendar-generate |
92960
5a10f6dafd69
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92922
diff
changeset
|
475 (defvar displayed-year) |
5a10f6dafd69
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92922
diff
changeset
|
476 |
93844
bf9ef749c23e
Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents:
93809
diff
changeset
|
477 ;; FIXME name that makes sense |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
478 ;;;###cal-autoload |
101083
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
479 (defun calendar-list-holidays (&optional event) |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
480 "Create a buffer containing the holidays for the current calendar window. |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
481 The holidays are those in the list `calendar-notable-days'. |
101083
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
482 Returns non-nil if any holidays are found. |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
483 If EVENT is non-nil, it's an event indicating the buffer position to |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
484 use instead of point." |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
485 (interactive (list last-nonmenu-event)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
486 ;; If called from a menu, with the calendar window not selected. |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
487 (with-current-buffer |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
488 (if event (window-buffer (posn-window (event-start event))) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
489 (current-buffer)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
490 (message "Looking up holidays...") |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
491 (let ((holiday-list (calendar-holiday-list)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
492 (m1 displayed-month) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
493 (y1 displayed-year) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
494 (m2 displayed-month) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
495 (y2 displayed-year)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
496 (if (not holiday-list) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
497 (message "Looking up holidays...none found") |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
498 (calendar-in-read-only-buffer holiday-buffer |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
499 (calendar-increment-month m1 y1 -1) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
500 (calendar-increment-month m2 y2 1) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
501 (calendar-set-mode-line |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
502 (if (= y1 y2) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
503 (format "Notable Dates from %s to %s, %d%%-" |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
504 (calendar-month-name m1) (calendar-month-name m2) y2) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
505 (format "Notable Dates from %s, %d to %s, %d%%-" |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
506 (calendar-month-name m1) y1 (calendar-month-name m2) y2))) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
507 (insert |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
508 (mapconcat |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
509 (lambda (x) (concat (calendar-date-string (car x)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
510 ": " (cadr x))) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
511 holiday-list "\n"))) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
512 (message "Looking up holidays...done")) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
513 holiday-list))) |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
514 |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
515 (define-obsolete-function-alias |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
516 'list-calendar-holidays 'calendar-list-holidays "23.1") |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
517 |
37631
00c265302412
(holidays): Add an autoload cookie. From Pavel Jank <Pavel@Janik.cz>.
Eli Zaretskii <eliz@gnu.org>
parents:
37001
diff
changeset
|
518 ;;;###autoload |
957 | 519 (defun holidays (&optional arg) |
406 | 520 "Display the holidays for last month, this month, and next month. |
92650 | 521 If called with an optional prefix argument ARG, prompts for month and year. |
406 | 522 This function is suitable for execution in a .emacs file." |
957 | 523 (interactive "P") |
406 | 524 (save-excursion |
957 | 525 (let* ((completion-ignore-case t) |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
526 (date (if arg (calendar-read-date t) |
9712
275845a98fa8
Use new form of calendar-read-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
7639
diff
changeset
|
527 (calendar-current-date))) |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
528 (displayed-month (calendar-extract-month date)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
529 (displayed-year (calendar-extract-year date))) |
84356
357b5ff720d4
(holiday-list, calendar-check-holidays, calendar-mark-holidays)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
530 (calendar-list-holidays)))) |
406 | 531 |
84576
1b5ca22699c0
(holiday-list): Rename it back to `list-holidays', but leave
Glenn Morris <rgm@gnu.org>
parents:
84556
diff
changeset
|
532 ;; rms: "Emacs commands to display a list of something generally start |
1b5ca22699c0
(holiday-list): Rename it back to `list-holidays', but leave
Glenn Morris <rgm@gnu.org>
parents:
84556
diff
changeset
|
533 ;; with `list-'. Please make `list-holidays' the principal name." |
17388
5c4602f0c45d
(list-holidays): Add autoload cookie.
Richard M. Stallman <rms@gnu.org>
parents:
17385
diff
changeset
|
534 ;;;###autoload |
93238
a2947a0dab56
(list-holidays): Make Y2 optional.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93228
diff
changeset
|
535 (defun list-holidays (y1 &optional y2 l label) |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
536 "Display holidays for years Y1 to Y2 (inclusive). |
93282 | 537 Y2 defaults to Y1. The optional list of holidays L defaults to |
538 `calendar-holidays'. If you want to control what holidays are | |
539 displayed, use a different list. For example, | |
69373 | 540 |
541 (list-holidays 2006 2006 | |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
542 (append holiday-general-holidays holiday-local-holidays)) |
69373 | 543 |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
544 will display holidays for the year 2006 defined in the two |
69373 | 545 mentioned lists, and nothing else. |
546 | |
69352 | 547 When called interactively, this command offers a choice of |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
548 holidays, based on the variables `holiday-solar-holidays' etc. See the |
69352 | 549 documentation of `calendar-holidays' for a list of the variables |
550 that control the choices, as well as a description of the format | |
551 of a holiday list. | |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
552 |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
553 The optional LABEL is used to label the buffer created." |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
554 (interactive |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
555 (let* ((start-year (calendar-read |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
556 "Starting year of holidays (>0): " |
92596 | 557 (lambda (x) (> x 0)) |
93844
bf9ef749c23e
Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents:
93809
diff
changeset
|
558 (number-to-string (calendar-extract-year |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
559 (calendar-current-date))))) |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
560 (end-year (calendar-read |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
561 (format "Ending year (inclusive) of holidays (>=%s): " |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
562 start-year) |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
563 (lambda (x) (>= x start-year)) |
93844
bf9ef749c23e
Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents:
93809
diff
changeset
|
564 (number-to-string start-year))) |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
565 (completion-ignore-case t) |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
566 (lists |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
567 (list |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
568 (cons "All" calendar-holidays) |
93228
3f12945a840c
(list-holidays): Assume atan always bound.
Glenn Morris <rgm@gnu.org>
parents:
93024
diff
changeset
|
569 (cons "Equinoxes/Solstices" |
3f12945a840c
(list-holidays): Assume atan always bound.
Glenn Morris <rgm@gnu.org>
parents:
93024
diff
changeset
|
570 (list (list 'solar-equinoxes-solstices))) |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
571 (if holiday-general-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
572 (cons "General" holiday-general-holidays)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
573 (if holiday-local-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
574 (cons "Local" holiday-local-holidays)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
575 (if holiday-other-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
576 (cons "Other" holiday-other-holidays)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
577 (if holiday-christian-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
578 (cons "Christian" holiday-christian-holidays)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
579 (if holiday-hebrew-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
580 (cons "Hebrew" holiday-hebrew-holidays)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
581 (if holiday-islamic-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
582 (cons "Islamic" holiday-islamic-holidays)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
583 (if holiday-bahai-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
584 (cons "Baha'i" holiday-bahai-holidays)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
585 (if holiday-oriental-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
586 (cons "Oriental" holiday-oriental-holidays)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
587 (if holiday-solar-holidays |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
588 (cons "Solar" holiday-solar-holidays)) |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
589 (cons "Ask" nil))) |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
590 (choice (capitalize |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
591 (completing-read "List (TAB for choices): " lists nil t))) |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
592 (which (if (string-equal choice "Ask") |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
593 (eval (read-variable "Enter list name: ")) |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
594 (cdr (assoc choice lists)))) |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
595 (name (if (string-equal choice "Equinoxes/Solstices") |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
596 choice |
17643
fd27882450bd
(list-holidays): Fix buffer title when list is
Richard M. Stallman <rms@gnu.org>
parents:
17388
diff
changeset
|
597 (if (member choice '("Ask" "")) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
37631
diff
changeset
|
598 "Holidays" |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
599 (format "%s Holidays" choice))))) |
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
600 (list start-year end-year which name))) |
93238
a2947a0dab56
(list-holidays): Make Y2 optional.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
93228
diff
changeset
|
601 (unless y2 (setq y2 y1)) |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
602 (message "Computing holidays...") |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
603 (let ((calendar-holidays (or l calendar-holidays)) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
604 (title (or label "Holidays")) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
605 (s (calendar-absolute-from-gregorian (list 2 1 y1))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
606 (e (calendar-absolute-from-gregorian (list 11 1 y2))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
607 (displayed-month 2) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
608 (displayed-year y1) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
609 holiday-list) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
610 (while (<= s e) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
611 (setq holiday-list (append holiday-list (calendar-holiday-list))) |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
612 (calendar-increment-month displayed-month displayed-year 3) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
613 (setq s (calendar-absolute-from-gregorian |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
614 (list displayed-month 1 displayed-year)))) |
17643
fd27882450bd
(list-holidays): Fix buffer title when list is
Richard M. Stallman <rms@gnu.org>
parents:
17388
diff
changeset
|
615 (save-excursion |
93024
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
616 (calendar-in-read-only-buffer holiday-buffer |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
617 (calendar-set-mode-line |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
618 (if (= y1 y2) |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
619 (format "%s for %s" title y1) |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
620 (format "%s for %s-%s" title y1 y2))) |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
621 (insert |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
622 (mapconcat |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
623 (lambda (x) (concat (calendar-date-string (car x)) |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
624 ": " (cadr x))) |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
625 holiday-list "\n"))) |
17643
fd27882450bd
(list-holidays): Fix buffer title when list is
Richard M. Stallman <rms@gnu.org>
parents:
17388
diff
changeset
|
626 (message "Computing holidays...done")))) |
fd27882450bd
(list-holidays): Fix buffer title when list is
Richard M. Stallman <rms@gnu.org>
parents:
17388
diff
changeset
|
627 |
86294
7962d9c627d8
(holiday-list): Add autoload cookie.
Glenn Morris <rgm@gnu.org>
parents:
84606
diff
changeset
|
628 ;;;###autoload |
84576
1b5ca22699c0
(holiday-list): Rename it back to `list-holidays', but leave
Glenn Morris <rgm@gnu.org>
parents:
84556
diff
changeset
|
629 (defalias 'holiday-list 'list-holidays) |
17385
259d4c9aae0e
(list-holidays): New function.
Richard M. Stallman <rms@gnu.org>
parents:
14687
diff
changeset
|
630 |
92842
aa76c7bffc0d
(hol-loaddefs): Load this rather than explicit autoloads.
Glenn Morris <rgm@gnu.org>
parents:
92650
diff
changeset
|
631 ;;;###diary-autoload |
84356
357b5ff720d4
(holiday-list, calendar-check-holidays, calendar-mark-holidays)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
632 (defun calendar-check-holidays (date) |
406 | 633 "Check the list of holidays for any that occur on DATE. |
634 The value returned is a list of strings of relevant holiday descriptions. | |
84356
357b5ff720d4
(holiday-list, calendar-check-holidays, calendar-mark-holidays)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
635 The holidays are those in the list `calendar-holidays'." |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
636 (let ((displayed-month (calendar-extract-month date)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
637 (displayed-year (calendar-extract-year date)) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
638 holiday-list) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
639 (dolist (h (calendar-holiday-list) holiday-list) |
84356
357b5ff720d4
(holiday-list, calendar-check-holidays, calendar-mark-holidays)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
640 (if (calendar-date-equal date (car h)) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
641 (setq holiday-list (append holiday-list (cdr h))))))) |
406 | 642 |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
643 (define-obsolete-function-alias |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
644 'check-calendar-holidays 'calendar-check-holidays "23.1") |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
645 |
105933
8f110099da5c
Update x-popup-menu declaration.
Glenn Morris <rgm@gnu.org>
parents:
105870
diff
changeset
|
646 (declare-function x-popup-menu "menu.c" (position menu)) |
97422
6e551caf98f6
Add declarations for builds without X.
Glenn Morris <rgm@gnu.org>
parents:
96305
diff
changeset
|
647 |
92842
aa76c7bffc0d
(hol-loaddefs): Load this rather than explicit autoloads.
Glenn Morris <rgm@gnu.org>
parents:
92650
diff
changeset
|
648 ;;;###cal-autoload |
96305
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
649 (defun calendar-cursor-holidays (&optional date event) |
96066
f0d44d21e743
(calendar-cursor-holidays): Accept optional date.
Glenn Morris <rgm@gnu.org>
parents:
94653
diff
changeset
|
650 "Find holidays for the date specified by the cursor in the calendar window. |
f0d44d21e743
(calendar-cursor-holidays): Accept optional date.
Glenn Morris <rgm@gnu.org>
parents:
94653
diff
changeset
|
651 Optional DATE is a list (month day year) to use instead of the |
96305
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
652 cursor position. EVENT specifies a buffer position to use for a date." |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
653 (interactive (list nil last-nonmenu-event)) |
406 | 654 (message "Checking holidays...") |
96305
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
655 (or date (setq date (calendar-cursor-to-date t event))) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
656 (let ((date-string (calendar-date-string date)) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
657 (holiday-list (calendar-check-holidays date)) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
658 selection msg) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
659 (if (mouse-event-p event) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
660 (and (setq selection (cal-menu-x-popup-menu event |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
661 (format "Holidays for %s" date-string) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
662 (if holiday-list |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
663 (mapcar 'list holiday-list) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
664 '("None")))) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
665 (call-interactively selection)) |
406 | 666 (if (not holiday-list) |
667 (message "No holidays known for %s" date-string) | |
96305
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
668 (if (<= (length (setq msg |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
669 (format "%s: %s" date-string |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
670 (mapconcat 'identity holiday-list "; ")))) |
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
671 (frame-width)) |
14318
faae84d059c1
(calendar-cursor-holidays): Pass proper format string to message.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
672 (message "%s" msg) |
93024
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
673 (calendar-in-read-only-buffer holiday-buffer |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
674 (calendar-set-mode-line date-string) |
efee212e0b17
(calendar-list-holidays, list-holidays, calendar-cursor-holidays):
Glenn Morris <rgm@gnu.org>
parents:
92960
diff
changeset
|
675 (insert (mapconcat 'identity holiday-list "\n"))) |
96305
017ec6527a01
(calendar-cursor-holidays): Handle mouse events.
Glenn Morris <rgm@gnu.org>
parents:
96066
diff
changeset
|
676 (message "Checking holidays...done")))))) |
406 | 677 |
93844
bf9ef749c23e
Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents:
93809
diff
changeset
|
678 ;; FIXME move to calendar? |
92842
aa76c7bffc0d
(hol-loaddefs): Load this rather than explicit autoloads.
Glenn Morris <rgm@gnu.org>
parents:
92650
diff
changeset
|
679 ;;;###cal-autoload |
101083
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
680 (defun calendar-mark-holidays (&optional event) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
681 "Mark notable days in the calendar window. |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
682 If EVENT is non-nil, it's an event indicating the buffer position to |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
683 use instead of point." |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
684 (interactive (list last-nonmenu-event)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
685 ;; If called from a menu, with the calendar window not selected. |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
686 (with-current-buffer |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
687 (if event (window-buffer (posn-window (event-start event))) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
688 (current-buffer)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
689 (setq calendar-mark-holidays-flag t) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
690 (message "Marking holidays...") |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
691 (dolist (holiday (calendar-holiday-list)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
692 (calendar-mark-visible-date (car holiday) calendar-holiday-marker)) |
27e9141ce15b
(calendar-list-holidays, calendar-mark-holidays): Add event handling,
Glenn Morris <rgm@gnu.org>
parents:
100908
diff
changeset
|
693 (message "Marking holidays...done"))) |
406 | 694 |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
695 (define-obsolete-function-alias |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
696 'mark-calendar-holidays 'calendar-mark-holidays "23.1") |
406 | 697 |
698 ;; Below are the functions that calculate the dates of holidays; these | |
3870
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
699 ;; are eval'ed in the function calendar-holiday-list. If you |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
700 ;; write other such functions, be sure to imitate the style used below. |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
701 ;; Remember that each function must return a list of items of the form |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
702 ;; ((month day year) string) of VISIBLE dates in the calendar window. |
406 | 703 |
3870
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
704 (defun holiday-fixed (month day string) |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
705 "Holiday on MONTH, DAY (Gregorian) called STRING. |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
706 If MONTH, DAY is visible, the value returned is the list (((MONTH DAY year) |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
707 STRING)). Returns nil if it is not visible in the current calendar window." |
93438 | 708 ;; This determines whether a given month is visible in the calendar. |
709 ;; cf calendar-date-is-visible-p (which also checks the year part). | |
710 ;; The day is irrelevant since only full months are displayed. | |
711 ;; Since the calendar displays three months at a time, month N | |
712 ;; is visible if displayed-month = N-1, N, N+1. | |
713 ;; In particular, November is visible if d-m = 10, 11, 12. | |
714 ;; This is useful, because we can do a one-sided test: | |
715 ;; November is visible if d-m > 9. (Similarly, February is visible if | |
716 ;; d-m < 4.) | |
717 ;; To determine if December is visible, we can shift the calendar | |
718 ;; back a month and ask if November is visible; to determine if | |
719 ;; October is visible, we can shift it forward a month and ask if | |
720 ;; November is visible; etc. | |
3870
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
721 (let ((m displayed-month) |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
722 (y displayed-year)) |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
723 (calendar-increment-month m y (- 11 month)) |
93438 | 724 (if (> m 9) ; is november visible? |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
725 (list (list (list month day y) string))))) |
406 | 726 |
3870
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
727 (defun holiday-float (month dayname n string &optional day) |
94456 | 728 "Holiday called STRING on the Nth DAYNAME after/before MONTH DAY. |
729 DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on. | |
730 If N>0, use the Nth DAYNAME after MONTH DAY. | |
731 If N<0, use the Nth DAYNAME before MONTH DAY. | |
732 DAY defaults to 1 if N>0, and MONTH's last day otherwise. | |
733 If the holiday is visible in the calendar window, returns a | |
734 list (((month day year) STRING)). Otherwise returns nil." | |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
735 ;; This is messy because the holiday may be visible, while the date |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
736 ;; on which it is based is not. For example, the first Monday after |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
737 ;; December 30 may be visible when January is not. For large values |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
738 ;; of |n| the problem is more grotesque. If we didn't have to worry |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
739 ;; about such cases, we could just use the original version of this |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
740 ;; function: |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
741 ;; (let ((m displayed-month) |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
742 ;; (y displayed-year)) |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
743 ;; (calendar-increment-month m y (- 11 month)) |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
744 ;; (if (> m 9); month in year y is visible |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
745 ;; (list (list (calendar-nth-named-day n dayname month y day) string))))) |
17891
6eb7095ca7ab
(holiday-float): Rewritten to fix bug when base date
Richard M. Stallman <rms@gnu.org>
parents:
17643
diff
changeset
|
746 (let* ((m1 displayed-month) |
6eb7095ca7ab
(holiday-float): Rewritten to fix bug when base date
Richard M. Stallman <rms@gnu.org>
parents:
17643
diff
changeset
|
747 (y1 displayed-year) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
748 (m2 displayed-month) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
749 (y2 displayed-year) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
750 (d1 (progn ; first possible base date for holiday |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
751 (calendar-increment-month m1 y1 -1) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
752 (+ (calendar-nth-named-absday 1 dayname m1 y1) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
753 (* -7 n) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
754 (if (> n 0) 1 -7)))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
755 (d2 ; last possible base date for holiday |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
756 (progn |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
757 (calendar-increment-month m2 y2 1) |
17891
6eb7095ca7ab
(holiday-float): Rewritten to fix bug when base date
Richard M. Stallman <rms@gnu.org>
parents:
17643
diff
changeset
|
758 (+ (calendar-nth-named-absday -1 dayname m2 y2) |
6eb7095ca7ab
(holiday-float): Rewritten to fix bug when base date
Richard M. Stallman <rms@gnu.org>
parents:
17643
diff
changeset
|
759 (* -7 n) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
760 (if (> n 0) 7 -1)))) |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
761 (y1 (calendar-extract-year (calendar-gregorian-from-absolute d1))) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
762 (y2 (calendar-extract-year (calendar-gregorian-from-absolute d2))) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
763 (y ; year of base date |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
764 (if (or (= y1 y2) (> month 9)) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
765 y1 |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
766 y2)) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
767 (d ; day of base date |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
768 (or day (if (> n 0) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
769 1 |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
770 (calendar-last-day-of-month month y)))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
771 (date ; base date for holiday |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
772 (calendar-absolute-from-gregorian (list month d y)))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
773 (and (<= d1 date) (<= date d2) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
774 (list (list (calendar-nth-named-day n dayname month y d) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
775 string))))) |
406 | 776 |
93580
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
777 (defun holiday-filter-visible-calendar (hlist) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
778 "Filter list of holidays HLIST, and return only the visible ones. |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
779 HLIST is a list of elements of the form (DATE) TEXT." |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
780 (delq nil (mapcar (lambda (p) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
781 (and (car p) (calendar-date-is-visible-p (car p)) p)) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
782 hlist))) |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
783 |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
784 (define-obsolete-function-alias |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
785 'filter-visible-calendar-holidays 'holiday-filter-visible-calendar "23.1") |
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
786 |
3870
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
787 (defun holiday-sexp (sexp string) |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
788 "Sexp holiday for dates in the calendar window. |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
789 SEXP is an expression in variable `year' that is evaluated to |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
790 give `date'. STRING is an expression in `date' that evaluates to |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
791 the holiday description of `date'. If `date' is visible in the |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
792 calendar window, the holiday STRING is on that date. If date is |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
793 nil, or if the date is not visible, there is no holiday." |
957 | 794 (let ((m displayed-month) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
795 (y displayed-year) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
796 year date) |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
797 (calendar-increment-month m y -1) |
84356
357b5ff720d4
(holiday-list, calendar-check-holidays, calendar-mark-holidays)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
798 (holiday-filter-visible-calendar |
357b5ff720d4
(holiday-list, calendar-check-holidays, calendar-mark-holidays)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
799 (list |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
800 (progn |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
801 (setq year y |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
802 date (eval sexp)) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
803 (list date (if date (eval string)))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
804 (progn |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
805 (setq year (1+ y) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
806 date (eval sexp)) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
807 (list date (if date (eval string)))))))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
808 |
957 | 809 |
58810
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
810 (defun holiday-advent (&optional n string) |
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
811 "Date of Nth day after advent (named STRING), if visible in calendar window. |
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
812 Negative values of N are interpreted as days before advent. |
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
813 STRING is used purely for display purposes. The return value has |
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
814 the form ((MONTH DAY YEAR) STRING), where the date is that of the |
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
815 Nth day before or after advent. |
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
816 |
58823
46becd97b4c5
Fix spelling mistake in previous changes.
Glenn Morris <rgm@gnu.org>
parents:
58810
diff
changeset
|
817 For backwards compatibility, if this function is called with no |
58810
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
818 arguments, then it returns the value appropriate for advent itself." |
58823
46becd97b4c5
Fix spelling mistake in previous changes.
Glenn Morris <rgm@gnu.org>
parents:
58810
diff
changeset
|
819 ;; Backwards compatibility layer. |
58810
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
820 (if (not n) |
9fcc0f024a83
(holiday-advent): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
58808
diff
changeset
|
821 (holiday-advent 0 "Advent") |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
822 (let* ((year displayed-year) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
823 (month displayed-month) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
824 (advent (progn |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
825 (calendar-increment-month month year -1) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
826 (calendar-gregorian-from-absolute |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
827 (+ n |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
828 (calendar-dayname-on-or-before |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
829 0 |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
830 (calendar-absolute-from-gregorian |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
831 (list 12 3 year)))))))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
832 (if (calendar-date-is-visible-p advent) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
833 (list (list advent string)))))) |
406 | 834 |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
835 (defun holiday-easter-etc (&optional n string) |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
836 "Date of Nth day after Easter (named STRING), if visible in calendar window. |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
837 Negative values of N are interpreted as days before Easter. |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
838 STRING is used purely for display purposes. The return value has |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
839 the form ((MONTH DAY YEAR) STRING), where the date is that of the |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
840 Nth day before or after Easter. |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
841 |
58823
46becd97b4c5
Fix spelling mistake in previous changes.
Glenn Morris <rgm@gnu.org>
parents:
58810
diff
changeset
|
842 For backwards compatibility, if this function is called with no |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
843 arguments, then it returns a list of \"standard\" Easter-related |
93633
f0a60a0ac089
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93580
diff
changeset
|
844 holidays (with more entries if `calendar-christian-all-holidays-flag' |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
845 is non-nil)." |
58823
46becd97b4c5
Fix spelling mistake in previous changes.
Glenn Morris <rgm@gnu.org>
parents:
58810
diff
changeset
|
846 ;; Backwards compatibility layer. |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
847 (if (not n) |
93580
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
848 (apply 'append |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
849 (mapcar (lambda (e) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
850 (apply 'holiday-easter-etc e)) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
851 ;; The combined list is not in order. |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
852 (append |
93633
f0a60a0ac089
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93580
diff
changeset
|
853 (if calendar-christian-all-holidays-flag |
93580
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
854 '((-63 "Septuagesima Sunday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
855 (-56 "Sexagesima Sunday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
856 (-49 "Shrove Sunday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
857 (-48 "Shrove Monday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
858 (-47 "Shrove Tuesday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
859 (-14 "Passion Sunday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
860 (-7 "Palm Sunday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
861 (-3 "Maundy Thursday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
862 (35 "Rogation Sunday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
863 (39 "Ascension Day") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
864 (49 "Pentecost (Whitsunday)") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
865 (50 "Whitmonday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
866 (56 "Trinity Sunday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
867 (60 "Corpus Christi"))) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
868 '((-46 "Ash Wednesday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
869 (-2 "Good Friday") |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
870 (0 "Easter Sunday"))))) |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
871 (let* ((century (1+ (/ displayed-year 100))) |
92649 | 872 (shifted-epact ; age of moon for April 5... |
92960
5a10f6dafd69
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92922
diff
changeset
|
873 (% (+ 14 (* 11 (% displayed-year 19)) ; ...by Nicaean rule |
92649 | 874 (- ; ...corrected for the Gregorian century rule |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
875 (/ (* 3 century) 4)) |
92922
e5d9e1e9c1b4
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92842
diff
changeset
|
876 (/ ; ...corrected for Metonic cycle inaccuracy |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
877 (+ 5 (* 8 century)) 25) |
92960
5a10f6dafd69
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92922
diff
changeset
|
878 (* 30 century)) ; keeps value positive |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
879 30)) |
92960
5a10f6dafd69
(displayed-month, displayed-year): Move declarations where needed.
Glenn Morris <rgm@gnu.org>
parents:
92922
diff
changeset
|
880 (adjusted-epact ; adjust for 29.5 day month |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
881 (if (or (zerop shifted-epact) |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
882 (and (= shifted-epact 1) (< 10 (% displayed-year 19)))) |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
883 (1+ shifted-epact) |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
884 shifted-epact)) |
92649 | 885 (paschal-moon ; day after the full moon on or after March 21 |
58808
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
886 (- (calendar-absolute-from-gregorian (list 4 19 displayed-year)) |
7d719c317dab
(holiday-easter-etc): Make arguments optional for backwards
Glenn Morris <rgm@gnu.org>
parents:
57197
diff
changeset
|
887 adjusted-epact)) |
93580
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
888 (abs-easter (calendar-dayname-on-or-before 0 (+ paschal-moon 7))) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
889 (greg (calendar-gregorian-from-absolute (+ abs-easter n)))) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
890 (if (calendar-date-is-visible-p greg) |
b6cea5b391eb
(calendar-holiday-list): Fix previous change.
Glenn Morris <rgm@gnu.org>
parents:
93494
diff
changeset
|
891 (list (list greg string)))))) |
406 | 892 |
86494
d3d37fadd367
(calendar-absolute-from-julian): Declare as a function.
Glenn Morris <rgm@gnu.org>
parents:
86294
diff
changeset
|
893 ;; Prior call to calendar-julian-from-absolute will autoload cal-julian. |
93639
d4a308909857
Update for cal-julian name changes.
Glenn Morris <rgm@gnu.org>
parents:
93633
diff
changeset
|
894 (declare-function calendar-julian-to-absolute "cal-julian" (date)) |
86494
d3d37fadd367
(calendar-absolute-from-julian): Declare as a function.
Glenn Morris <rgm@gnu.org>
parents:
86294
diff
changeset
|
895 |
3870
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
896 (defun holiday-greek-orthodox-easter () |
4acdfdf2a7c9
* holidays.el (calendar-holiday-function-fixed,
Jim Blandy <jimb@redhat.com>
parents:
3728
diff
changeset
|
897 "Date of Easter according to the rule of the Council of Nicaea." |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
898 (let* ((m displayed-month) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
899 (y displayed-year) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
900 (julian-year (progn |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
901 (calendar-increment-month m y 1) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93712
diff
changeset
|
902 (calendar-extract-year |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
903 (calendar-julian-from-absolute |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
904 (calendar-absolute-from-gregorian |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
905 (list m (calendar-last-day-of-month m y) y)))))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
906 (shifted-epact ; age of moon for April 5 |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
907 (% (+ 14 |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
908 (* 11 (% julian-year 19))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
909 30)) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
910 (paschal-moon ; day after full moon on or after March 21 |
93639
d4a308909857
Update for cal-julian name changes.
Glenn Morris <rgm@gnu.org>
parents:
93633
diff
changeset
|
911 (- (calendar-julian-to-absolute (list 4 19 julian-year)) |
93494
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
912 shifted-epact)) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
913 (nicaean-easter ; Sunday following the Paschal moon |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
914 (calendar-gregorian-from-absolute |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
915 (calendar-dayname-on-or-before 0 (+ paschal-moon 7))))) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
916 (if (calendar-date-is-visible-p nicaean-easter) |
101c1d082feb
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93438
diff
changeset
|
917 (list (list nicaean-easter "Pascha (Greek Orthodox Easter)"))))) |
957 | 918 |
584 | 919 (provide 'holidays) |
920 | |
84356
357b5ff720d4
(holiday-list, calendar-check-holidays, calendar-mark-holidays)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
78216
diff
changeset
|
921 ;; arch-tag: 48eb3117-75a7-4dbe-8fd9-873c3cbb0d37 |
660
08eb386dd0f3
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
584
diff
changeset
|
922 ;;; holidays.el ends here |