]> code.delx.au - gnu-emacs/blobdiff - lispref/calendar.texi
(Instrumenting Macro Calls): Fix another typo.
[gnu-emacs] / lispref / calendar.texi
index 7f5b2b31323e20a58feb6add598b31ba2e85d960..5c63d6f95918b7f3e333bae08b19f02f257de3ed 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1995, 1998 Free Software Foundation, Inc. 
+@c Copyright (C) 1990, 1991, 1992, 1993, 1995, 1998 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @node Calendar, System Interface, Display, Top
 @chapter Customizing the Calendar and Diary
@@ -16,7 +16,7 @@ diary suit your personal tastes.
 * Daylight Savings::       Changing the default.
 * Diary Customizing::      Defaults you can set.
 * Hebrew/Islamic Entries:: How to obtain them.
-* Fancy Diary Display::    Enhancing the diary display, sorting entries, 
+* Fancy Diary Display::    Enhancing the diary display, sorting entries,
                              using included diary files.
 * Sexp Diary Entries::     Fancy things you can do.
 * Appt Customizing::      Customizing appointment reminders.
@@ -52,8 +52,7 @@ window.
 @code{t} in order to mark any dates with diary entries.  This takes
 effect whenever the calendar window contents are recomputed.  There are
 two ways of marking these dates: by changing the face (@pxref{Faces}),
-if the display supports that, or by placing a plus sign (@samp{+})
-beside the date otherwise.
+or by placing a plus sign (@samp{+}) beside the date.
 
 @vindex mark-holidays-in-calendar
   Similarly, setting the variable @code{mark-holidays-in-calendar} to
@@ -63,13 +62,12 @@ asterisk (@samp{*}).
 @vindex calendar-holiday-marker
 @vindex diary-entry-marker
   The variable @code{calendar-holiday-marker} specifies how to mark a
-date as being a holiday.  Its value may be a character to insert next to
-the date, or a face name to use for displaying the date.  Likewise, the
-variable @code{diary-entry-marker} specifies how to mark a date that has
-diary entries.  The calendar creates faces named @code{holiday-face} and
-@code{diary-face} for these purposes; those symbols are the default
-values of these variables, when Emacs supports multiple faces on your
-terminal.
+date as being a holiday.  Its value may be a single-character string
+to insert next to the date, or a face name to use for displaying the
+date.  Likewise, the variable @code{diary-entry-marker} specifies how
+to mark a date that has diary entries.  The calendar creates faces
+named @code{holiday-face} and @code{diary-face} for these purposes;
+those symbols are the default values of these variables.
 
 @vindex calendar-load-hook
   The variable @code{calendar-load-hook} is a normal hook run when the
@@ -105,12 +103,11 @@ changing its face or by adding an asterisk.  Here's how to use it:
 
 @noindent
 @vindex calendar-today-marker
-The variable @code{calendar-today-marker} specifies how to mark today's
-date.  Its value should be a character to insert next to the date or a
-face name to use for displaying the date.  A face named
-@code{calendar-today-face} is provided for this purpose; that symbol is
-the default for this variable when Emacs supports multiple faces on your
-terminal.
+The variable @code{calendar-today-marker} specifies how to mark
+today's date.  Its value should be a single-character string to insert
+next to the date or a face name to use for displaying the date.  A
+face named @code{calendar-today-face} is provided for this purpose;
+that symbol is the default for this variable.
 
 @vindex today-invisible-calendar-hook
 @noindent
@@ -118,8 +115,8 @@ terminal.
 the current date is @emph{not} visible in the window.
 
 @vindex calendar-move-hook
-  Starting in Emacs 21, each of the calendar cursor motion commands
-runs the hook @code{calendar-move-hook} after it moves the cursor.
+  Each of the calendar cursor motion commands runs the hook
+@code{calendar-move-hook} after it moves the cursor.
 
 @node Holiday Customizing
 @section Customizing the Holidays
@@ -133,7 +130,7 @@ You can customize these lists of holidays to your own needs, adding or
 deleting holidays.  The lists of holidays that Emacs uses are for
 general holidays (@code{general-holidays}), local holidays
 (@code{local-holidays}), Christian holidays (@code{christian-holidays}),
-Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Moslem)
+Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim)
 holidays (@code{islamic-holidays}), and other holidays
 (@code{other-holidays}).
 
@@ -258,12 +255,12 @@ occur on the first Tuesday after the first Monday in November of years
 divisible by 4:
 
 @smallexample
-(holiday-sexp (if (= 0 (% year 4))
+(holiday-sexp '(if (= 0 (% year 4))
                    (calendar-gregorian-from-absolute
                     (1+ (calendar-dayname-on-or-before
                           1 (+ 6 (calendar-absolute-from-gregorian
-                                  (list 11 1 year))))))
-              "US Presidential Election"))
+                                  (list 11 1 year)))))))
+              "US Presidential Election")
 @end smallexample
 
 @noindent
@@ -546,7 +543,7 @@ the fourth pattern.
 well as entries based on the world-standard Gregorian calendar.
 However, because recognition of such entries is time-consuming and most
 people don't use them, you must explicitly enable their use.  If you
-want the diary to recognize Hebrew-date diary entries, for example, 
+want the diary to recognize Hebrew-date diary entries, for example,
 you must do this:
 
 @vindex nongregorian-diary-listing-hook
@@ -606,7 +603,7 @@ entry matches any date that has the same Hebrew day-within-month as the
 selected date.
 @item i h y
 Add a diary entry for the day of the Hebrew year corresponding to the
-selected date (@code{insert-yearly-hebrew-diary-entry}).  This diary 
+selected date (@code{insert-yearly-hebrew-diary-entry}).  This diary
 entry matches any date which has the same Hebrew month and day-within-month
 as the selected date.
 @item i i d
@@ -629,7 +626,7 @@ selected date (@code{insert-yearly-islamic-diary-entry}).
   These commands work much like the corresponding commands for ordinary
 diary entries: they apply to the date that point is on in the calendar
 window, and what they do is insert just the date portion of a diary entry
-at the end of your diary file.  You must then insert the rest of the 
+at the end of your diary file.  You must then insert the rest of the
 diary entry.
 
 @node Fancy Diary Display
@@ -833,13 +830,25 @@ Pay rent
 @noindent
 on the last Monday of every month.
 
-  The generality of sexp diary entries lets you specify any diary entry
-that you can describe algorithmically.  A sexp diary entry contains an
-expression that computes whether the entry applies to any given date.
-If its value is non-@code{nil}, the entry applies to that date;
-otherwise, it does not.  The expression can use the variable  @code{date}
-to find the date being considered; its value is a list (@var{month}
-@var{day} @var{year}) that refers to the Gregorian calendar.
+  The generality of sexp diary entries lets you specify any diary
+entry that you can describe algorithmically.  A sexp diary entry
+contains an expression that computes whether the entry applies to any
+given date.  If its value is non-@code{nil}, the entry applies to that
+date; otherwise, it does not.  The expression can use the variable
+@code{date} to find the date being considered; its value is a list
+(@var{month} @var{day} @var{year}) that refers to the Gregorian
+calendar.
+
+  The sexp diary entry applies to a date when the expression's value
+is non-@code{nil}, but some values have more specific meanings.  If
+the value is a string, that string is a description of the event which
+occurs on that date.  The value can also have the form
+@code{(@var{mark} . @var{string})}; then @var{mark} specifies how to
+mark the date in the calendar, and @var{string} is the description of
+the event.  If @var{mark} is a single-character string, that character
+appears next to the date in the calendar.  If @var{mark} is a face
+name, the date is displayed in that face.  If @var{mark} is
+@code{nil}, that specifies no particular highlighting for the date.
 
   Suppose you get paid on the 21st of the month if it is a weekday, and
 on the Friday before if the 21st is on a weekend.  Here is how to write
@@ -936,6 +945,11 @@ the European style, the order of the parameters is changed to @var{day},
 @var{month}, @var{year}.)
 @end table
 
+  All the functions documented above take an optional argument
+@var{mark} which specifies how to mark the date in the calendar display.
+If one of these functions decides that it applies to a certain date,
+it returns a value that contains @var{mark}.
+
 @node Appt Customizing
 @section Customizing Appointment Reminders
 
@@ -953,7 +967,7 @@ how far in advance it begins doing so, by setting these variables:
 @table @code
 @item appt-message-warning-time
 The time in minutes before an appointment that the reminder begins.  The
-default is 10 minutes.
+default is 12 minutes.
 @item appt-audible
 If this is non-@code{nil}, Emacs rings the
 terminal bell for appointment reminders.  The default is @code{t}.
@@ -974,5 +988,9 @@ This variable holds a function to use to get rid of the appointment
 message window, when its time is up.
 @item appt-display-duration
 The number of seconds to display an appointment message.  The default
-is 5 seconds.
+is 10 seconds.
 @end table
+
+@ignore
+   arch-tag: 8e50c766-4703-4888-a421-af15244cca7e
+@end ignore