aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-07 20:31:17 +0000
committerRichard M. Stallman1994-04-07 20:31:17 +0000
commite555fdd878a0e0bc7f1f50a8fdeff248afffe77d (patch)
treeac63bd7532433a8b2d01b85a6aa1f3d21d810031
parent5924340384dc3c922e979b01285ff78a72db38a2 (diff)
downloademacs-e555fdd878a0e0bc7f1f50a8fdeff248afffe77d.tar.gz
emacs-e555fdd878a0e0bc7f1f50a8fdeff248afffe77d.zip
Many doc fixes.
(general-holidays, *-holidays): Add risky-local-variable property.
-rw-r--r--lisp/calendar/calendar.el159
1 files changed, 89 insertions, 70 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 124125f88df..733c37c8b6d 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -9,26 +9,21 @@
9;; Hebrew calendar, Islamic calendar, ISO calendar, Julian day number, 9;; Hebrew calendar, Islamic calendar, ISO calendar, Julian day number,
10;; diary, holidays 10;; diary, holidays
11 11
12(defun calendar-version ()
13 (interactive)
14 (message "Version 5.3, January 25, 1994"))
15
16;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
17 13
14;; GNU Emacs is free software; you can redistribute it and/or modify
15;; it under the terms of the GNU General Public License as published by
16;; the Free Software Foundation; either version 2, or (at your option)
17;; any later version.
18
18;; GNU Emacs is distributed in the hope that it will be useful, 19;; GNU Emacs is distributed in the hope that it will be useful,
19;; but WITHOUT ANY WARRANTY. No author or distributor 20;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20;; accepts responsibility to anyone for the consequences of using it 21;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;; or for whether it serves any particular purpose or works at all, 22;; GNU General Public License for more details.
22;; unless he says so in writing. Refer to the GNU Emacs General Public 23
23;; License for full details. 24;; You should have received a copy of the GNU General Public License
24 25;; along with GNU Emacs; see the file COPYING. If not, write to
25;; Everyone is granted permission to copy, modify and redistribute 26;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
26;; GNU Emacs, but only under the conditions described in the
27;; GNU Emacs General Public License. A copy of this license is
28;; supposed to have been given to you along with GNU Emacs so you
29;; can know your rights and responsibilities. It should be in a
30;; file named COPYING. Among other things, the copyright notice
31;; and this notice must be preserved on all copies.
32 27
33;;; Commentary: 28;;; Commentary:
34 29
@@ -104,6 +99,10 @@
104 99
105;;; Code: 100;;; Code:
106 101
102(defun calendar-version ()
103 (interactive)
104 (message "Version 5.3, January 25, 1994"))
105
107;;;###autoload 106;;;###autoload
108(defvar calendar-week-start-day 0 107(defvar calendar-week-start-day 0
109 "*The day of the week on which a week in the calendar begins. 108 "*The day of the week on which a week in the calendar begins.
@@ -111,7 +110,7 @@
111 110
112;;;###autoload 111;;;###autoload
113(defvar view-diary-entries-initially nil 112(defvar view-diary-entries-initially nil
114 "*If t, the diary entries for the current date will be displayed on entry. 113 "*Non-nil means display current date's diary entries on entry.
115The diary is displayed in another window when the calendar is first displayed, 114The diary is displayed in another window when the calendar is first displayed,
116if the current date is visible. The number of days of diary entries displayed 115if the current date is visible. The number of days of diary entries displayed
117is governed by the variable `number-of-diary-entries'.") 116is governed by the variable `number-of-diary-entries'.")
@@ -123,18 +122,21 @@ This variable affects the diary display when the command M-x diary is used,
123or if the value of the variable `view-diary-entries-initially' is t. For 122or if the value of the variable `view-diary-entries-initially' is t. For
124example, if the default value 1 is used, then only the current day's diary 123example, if the default value 1 is used, then only the current day's diary
125entries will be displayed. If the value 2 is used, then both the current 124entries will be displayed. If the value 2 is used, then both the current
126day's and the next day's entries will be displayed. The value can also be 125day's and the next day's entries will be displayed.
127a vector such as [0 2 2 2 2 4 1]; this value will cause no diary entries to 126
128be displayed on Sunday, the current date's and the next day's diary entries 127The value can also be a vector such as [0 2 2 2 2 4 1]; this value
129to be displayed Monday through Thursday, Friday through Monday's entries to 128says to display no diary entries on Sunday, the display the entries
130be displayed on Friday, and only Saturday's entries to be displayed on 129for the current date and the day after on Monday through Thursday,
131Saturday. This variable does not affect the diary display with the `d' 130display Friday through Monday's entries on Friday, and display only
132command from the calendar; in that case, the prefix argument controls the 131Saturday's entries on Saturday.
132
133This variable does not affect the diary display with the `d' command
134from the calendar; in that case, the prefix argument controls the
133number of days of diary entries displayed.") 135number of days of diary entries displayed.")
134 136
135;;;###autoload 137;;;###autoload
136(defvar mark-diary-entries-in-calendar nil 138(defvar mark-diary-entries-in-calendar nil
137 "*If t, dates with diary entries will be marked in the calendar window. 139 "*Non-nil means mark dates with diary entries, in the calendar window.
138The marking symbol is specified by the variable `diary-entry-marker'.") 140The marking symbol is specified by the variable `diary-entry-marker'.")
139 141
140(defvar diary-entry-marker 142(defvar diary-entry-marker
@@ -174,49 +176,42 @@ Can be either a single-character string or a face.")
174 176
175;;;###autoload 177;;;###autoload
176(defvar view-calendar-holidays-initially nil 178(defvar view-calendar-holidays-initially nil
177 "*If t, holidays for current three month period will be displayed on entry. 179 "*Non-nil means display holidays for current three month period on entry.
178The holidays are displayed in another window when the calendar is first 180The holidays are displayed in another window when the calendar is first
179displayed.") 181displayed.")
180 182
181;;;###autoload 183;;;###autoload
182(defvar mark-holidays-in-calendar nil 184(defvar mark-holidays-in-calendar nil
183 "*If t, dates of holidays will be marked in the calendar window. 185 "*Non-nil means mark dates of holidays in the calendar window.
184The marking symbol is specified by the variable `calendar-holiday-marker'.") 186The marking symbol is specified by the variable `calendar-holiday-marker'.")
185 187
186;;;###autoload 188;;;###autoload
187(defvar all-hebrew-calendar-holidays nil 189(defvar all-hebrew-calendar-holidays nil
188 "*If nil, show only major holidays from the Hebrew calendar. 190 "*If nil, show only major holidays from the Hebrew calendar.
191This means only those Jewish holidays that appear on secular calendars.
189 192
190If nil, the only holidays from the Hebrew calendar shown will be those days of 193If t, show all the holidays that would appear in a complete Hebrew calendar.")
191such major interest as to appear on secular calendars.
192
193If t, the holidays shown in the calendar will include all special days that
194would be shown on a complete Hebrew calendar.")
195 194
196;;;###autoload 195;;;###autoload
197(defvar all-christian-calendar-holidays nil 196(defvar all-christian-calendar-holidays nil
198 "*If nil, show only major holidays from the Christian calendar. 197 "*If nil, show only major holidays from the Christian calendar.
198This means only those Christian holidays that appear on secular calendars.
199 199
200If nil, the only holidays from the Christian calendar shown will be those days 200If t, show all the holidays that would appear in a complete Christian
201of such major interest as to appear on secular calendars. 201calendar.")
202
203If t, the holidays shown in the calendar will include all special days that
204would be shown on a complete Christian calendar.")
205 202
206;;;###autoload 203;;;###autoload
207(defvar all-islamic-calendar-holidays nil 204(defvar all-islamic-calendar-holidays nil
208 "*If nil, show only major holidays from the Islamic calendar. 205 "*If nil, show only major holidays from the Islamic calendar.
206This means only those Islamic holidays that appear on secular calendars.
209 207
210If nil, the only holidays from the Islamic calendar shown will be those days 208If t, show all the holidays that would appear in a complete Islamic
211of such major interest as to appear on secular calendars. 209calendar.")
212
213If t, the holidays shown in the calendar will include all special days that
214would be shown on a complete Islamic calendar.")
215 210
216;;;###autoload 211;;;###autoload
217(defvar calendar-load-hook nil 212(defvar calendar-load-hook nil
218 "*List of functions to be called after the calendar is first loaded. 213 "*List of functions to be called after the calendar is first loaded.
219This is the place to add key bindings to calendar-mode-map.") 214This is the place to add key bindings to `calendar-mode-map'.")
220 215
221;;;###autoload 216;;;###autoload
222(defvar initial-calendar-window-hook nil 217(defvar initial-calendar-window-hook nil
@@ -313,8 +308,8 @@ entries (in the default American style):
313 &* 15 time cards due. 308 &* 15 time cards due.
314 309
315If the first line of a diary entry consists only of the date or day name with 310If the first line of a diary entry consists only of the date or day name with
316no trailing blanks or punctuation, then that line will not be displayed in the 311no trailing blanks or punctuation, then that line is not displayed in the
317diary window; only the continuation lines will be shown. For example, the 312diary window; only the continuation lines is shown. For example, the
318single diary entry 313single diary entry
319 314
320 02/11/1989 315 02/11/1989
@@ -538,7 +533,7 @@ Can be used for appointment notification.")
538;;;###autoload 533;;;###autoload
539(defvar diary-display-hook nil 534(defvar diary-display-hook nil
540 "*List of functions that handle the display of the diary. 535 "*List of functions that handle the display of the diary.
541If nil (the default), `simple-diary-display' will be used. Use `ignore' for no 536If nil (the default), `simple-diary-display' is used. Use `ignore' for no
542diary display. 537diary display.
543 538
544Ordinarily, this just displays the diary buffer (with holidays indicated in 539Ordinarily, this just displays the diary buffer (with holidays indicated in
@@ -597,14 +592,16 @@ are holidays.")
597 592
598;;;###autoload 593;;;###autoload
599(defvar holidays-in-diary-buffer t 594(defvar holidays-in-diary-buffer t
600 "*If t, the holidays will be indicated in the diary display. 595 "*Non-nil means include holidays in the diary display.
601The holidays will be given in the mode line of the diary buffer, or in the 596The holidays appear in the mode line of the diary buffer, or in the
602fancy diary buffer next to the date. This slows down the diary functions 597fancy diary buffer next to the date. This slows down the diary functions
603somewhat; setting it to nil will make the diary display faster.") 598somewhat; setting it to nil makes the diary display faster.")
604 599
605(defvar calendar-mark-ring nil) 600(defvar calendar-mark-ring nil)
606 601
607;;;###autoload 602;;;###autoload
603(put 'general-holidays 'risky-local-variable t)
604;;;###autoload
608(defvar general-holidays 605(defvar general-holidays
609 '((holiday-fixed 1 1 "New Year's Day") 606 '((holiday-fixed 1 1 "New Year's Day")
610 (holiday-float 1 1 3 "Martin Luther King Day") 607 (holiday-float 1 1 3 "Martin Luther King Day")
@@ -627,16 +624,22 @@ somewhat; setting it to nil will make the diary display faster.")
627See the documentation for `calendar-holidays' for details.") 624See the documentation for `calendar-holidays' for details.")
628 625
629;;;###autoload 626;;;###autoload
627(put 'local-holidays 'risky-local-variable t)
628;;;###autoload
630(defvar local-holidays nil 629(defvar local-holidays nil
631 "*Local holidays. 630 "*Local holidays.
632See the documentation for `calendar-holidays' for details.") 631See the documentation for `calendar-holidays' for details.")
633 632
634;;;###autoload 633;;;###autoload
634(put 'other-holidays 'risky-local-variable t)
635;;;###autoload
635(defvar other-holidays nil 636(defvar other-holidays nil
636 "*User defined holidays. 637 "*User defined holidays.
637See the documentation for `calendar-holidays' for details.") 638See the documentation for `calendar-holidays' for details.")
638 639
639;;;###autoload 640;;;###autoload
641(put 'hebrew-holidays-1 'risky-local-variable t)
642;;;###autoload
640(defvar hebrew-holidays-1 643(defvar hebrew-holidays-1
641 '((holiday-rosh-hashanah-etc) 644 '((holiday-rosh-hashanah-etc)
642 (if all-hebrew-calendar-holidays 645 (if all-hebrew-calendar-holidays
@@ -655,6 +658,8 @@ See the documentation for `calendar-holidays' for details.")
655 21))) "\"Tal Umatar\" (evening)")))) 658 21))) "\"Tal Umatar\" (evening)"))))
656 659
657;;;###autoload 660;;;###autoload
661(put 'hebrew-holidays-2 'risky-local-variable t)
662;;;###autoload
658(defvar hebrew-holidays-2 663(defvar hebrew-holidays-2
659 '((if all-hebrew-calendar-holidays 664 '((if all-hebrew-calendar-holidays
660 (holiday-hanukkah) 665 (holiday-hanukkah)
@@ -675,6 +680,8 @@ See the documentation for `calendar-holidays' for details.")
675 (holiday-hebrew 11 15 "Tu B'Shevat")))) 680 (holiday-hebrew 11 15 "Tu B'Shevat"))))
676 681
677;;;###autoload 682;;;###autoload
683(put 'hebrew-holidays-3 'risky-local-variable t)
684;;;###autoload
678(defvar hebrew-holidays-3 685(defvar hebrew-holidays-3
679 '((if all-hebrew-calendar-holidays 686 '((if all-hebrew-calendar-holidays
680 (holiday-hebrew 687 (holiday-hebrew
@@ -706,6 +713,8 @@ See the documentation for `calendar-holidays' for details.")
706 "Shabbat Shirah")))) 713 "Shabbat Shirah"))))
707 714
708;;;###autoload 715;;;###autoload
716(put 'hebrew-holidays-4 'risky-local-variable t)
717;;;###autoload
709(defvar hebrew-holidays-4 718(defvar hebrew-holidays-4
710 '((holiday-passover-etc) 719 '((holiday-passover-etc)
711 (if (and all-hebrew-calendar-holidays 720 (if (and all-hebrew-calendar-holidays
@@ -723,12 +732,16 @@ See the documentation for `calendar-holidays' for details.")
723 (holiday-tisha-b-av-etc)))) 732 (holiday-tisha-b-av-etc))))
724 733
725;;;###autoload 734;;;###autoload
735(put 'hebrew-holidays 'risky-local-variable t)
736;;;###autoload
726(defvar hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2 737(defvar hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2
727 hebrew-holidays-3 hebrew-holidays-4) 738 hebrew-holidays-3 hebrew-holidays-4)
728 "*Jewish holidays. 739 "*Jewish holidays.
729See the documentation for `calendar-holidays' for details.") 740See the documentation for `calendar-holidays' for details.")
730 741
731;;;###autoload 742;;;###autoload
743(put 'christian-holidays 'risky-local-variable t)
744;;;###autoload
732(defvar christian-holidays 745(defvar christian-holidays
733 '((if all-christian-calendar-holidays 746 '((if all-christian-calendar-holidays
734 (holiday-fixed 1 6 "Epiphany")) 747 (holiday-fixed 1 6 "Epiphany"))
@@ -746,6 +759,8 @@ See the documentation for `calendar-holidays' for details.")
746See the documentation for `calendar-holidays' for details.") 759See the documentation for `calendar-holidays' for details.")
747 760
748;;;###autoload 761;;;###autoload
762(put 'islamic-holidays 'risky-local-variable t)
763;;;###autoload
749(defvar islamic-holidays 764(defvar islamic-holidays
750 '((holiday-islamic 765 '((holiday-islamic
751 1 1 766 1 1
@@ -777,6 +792,8 @@ See the documentation for `calendar-holidays' for details.")
777See the documentation for `calendar-holidays' for details.") 792See the documentation for `calendar-holidays' for details.")
778 793
779;;;###autoload 794;;;###autoload
795(put 'solar-holidays 'risky-local-variable t)
796;;;###autoload
780(defvar solar-holidays 797(defvar solar-holidays
781 '((if (fboundp 'atan) 798 '((if (fboundp 'atan)
782 (solar-equinoxes-solstices)) 799 (solar-equinoxes-solstices))
@@ -809,6 +826,8 @@ See the documentation for `calendar-holidays' for details.")
809 "*Sun-related holidays. 826 "*Sun-related holidays.
810See the documentation for `calendar-holidays' for details.") 827See the documentation for `calendar-holidays' for details.")
811 828
829;;;###autoload
830(put 'calendar-holidays 'risky-local-variable t)
812(defvar calendar-holidays 831(defvar calendar-holidays
813 (append general-holidays local-holidays other-holidays 832 (append general-holidays local-holidays other-holidays
814 christian-holidays hebrew-holidays islamic-holidays 833 christian-holidays hebrew-holidays islamic-holidays
@@ -1694,7 +1713,7 @@ To find the times of sunrise and sunset and lunar phases use
1694 \\[calendar-sunrise-sunset] show times of sunrise and sunset 1713 \\[calendar-sunrise-sunset] show times of sunrise and sunset
1695 \\[calendar-phases-of-moon] show times of quarters of the moon 1714 \\[calendar-phases-of-moon] show times of quarters of the moon
1696 1715
1697The times given will be for location `calendar-location-name' at latitude 1716The times given apply to location `calendar-location-name' at latitude
1698`calendar-latitude', longitude `calendar-longitude'; set these variables for 1717`calendar-latitude', longitude `calendar-longitude'; set these variables for
1699your location. The following variables are also consulted, and you must set 1718your location. The following variables are also consulted, and you must set
1700them if your system does not initialize them properly: `calendar-time-zone', 1719them if your system does not initialize them properly: `calendar-time-zone',
@@ -1707,27 +1726,27 @@ To exit from the calendar use
1707 1726
1708 \\[exit-calendar] exit from calendar 1727 \\[exit-calendar] exit from calendar
1709 1728
1710The variable `view-diary-entries-initially', whose default is nil, can be 1729Set `view-diary-entries-initially' to a non-nil value to display
1711set to to t cause diary entries for the current date will be displayed in 1730diary entries for the current date in
1712another window when the calendar is first displayed, if the current date is 1731another window when the calendar is first displayed, if the current date is
1713visible. The variable `number-of-diary-entries' controls number of days of 1732visible. The variable `number-of-diary-entries' controls number of days of
1714diary entries that will be displayed initially or with the command M-x 1733diary entries that to display initially or with the command M-x
1715diary. For example, if the default value 1 is used, then only the current 1734diary. For example, the default value 1 says to display only the current
1716day's diary entries will be displayed. If the value 2 is used, both the 1735day's diary entries. The value 2 says to display both the
1717current day's and the next day's entries will be displayed. The value can 1736current day's and the next day's entries.
1718also be a vector: If the value is [0 2 2 2 2 4 1] then no diary entries 1737
1719will be displayed on Sunday, the current date's and the next day's diary 1738The value can also be a vector such as [0 2 2 2 2 4 1]; this value
1720entries will be displayed Monday through Thursday, Friday through Monday's 1739says to display no diary entries on Sunday, the display the entries
1721entries will be displayed on Friday, while on Saturday only that day's 1740for the current date and the day after on Monday through Thursday,
1722entries will be displayed. 1741display Friday through Monday's entries on Friday, and display only
1723 1742Saturday's entries on Saturday.
1724The variable `view-calendar-holidays-initially' can be set to t to cause the 1743
1725holidays for the current three month period will be displayed on entry to the 1744Set `view-calendar-holidays-initially' to a non-nil value to display
1726calendar. The holidays are displayed in another window. 1745holidays for the current three month period on entry to the calendar.
1727 1746
1728The variable `mark-diary-entries-in-calendar' can be set to t to cause any 1747Set `mark-diary-entries-in-calendar' to a non-nil value to mark in the
1729dates visible with calendar entries to be marked with the symbol specified by 1748calendar all the dates that have diary entries. The variable
1730the variable `diary-entry-marker'. 1749`diary-entry-marker' controls how to mark them.
1731 1750
1732The variable `calendar-load-hook', whose default value is nil, is list of 1751The variable `calendar-load-hook', whose default value is nil, is list of
1733functions to be called when the calendar is first loaded. 1752functions to be called when the calendar is first loaded.