Merge from emacs-23; up to 2010-06-11T14:39:54Z!cyd@stupidchicken.com.
[bpt/emacs.git] / doc / emacs / calendar.texi
index cfa7d2e..9de2238 100644 (file)
@@ -1,8 +1,8 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
+@c   Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
-@node Calendar/Diary, Gnus, Dired, Top
+@node Calendar/Diary, Document View, Dired, Top
 @chapter The Calendar and the Diary
 @cindex calendar
 @findex calendar
@@ -19,8 +19,8 @@ prompts you for the month and year to be the center of the three-month
 calendar.  The calendar uses its own buffer, whose major mode is
 Calendar mode.
 
-  @kbd{Mouse-2} in the calendar brings up a menu of operations on a
-particular date; @kbd{Mouse-3} brings up a menu of commonly used
+  @kbd{Mouse-3} in the calendar brings up a menu of operations on a
+particular date; @kbd{Mouse-2} brings up a menu of commonly used
 calendar features that are independent of any particular date.  To exit
 the calendar, type @kbd{q}.
 
@@ -41,7 +41,7 @@ about more specialized features.
 * Lunar Phases::        Displaying phases of the moon.
 * Other Calendars::     Converting dates to other calendar systems.
 * Diary::               Displaying events from your diary.
-* Appointments::       Reminders when it's time to do something.
+* Appointments::        Reminders when it's time to do something.
 * Importing Diary::     Converting diary events to/from other formats.
 * Daylight Saving::     How to specify when daylight saving time is active.
 * Time Intervals::      Keeping track of time intervals.
@@ -195,7 +195,7 @@ Move point to specified date (@code{calendar-goto-date}).
 @item g D
 Move point to specified day of year (@code{calendar-goto-day-of-year}).
 @item g w
-Move point to specified week of year (@code{calendar-goto-iso-week}).
+Move point to specified week of year (@code{calendar-iso-goto-week}).
 @item o
 Center calendar around specified month (@code{calendar-other-month}).
 @item .
@@ -212,11 +212,11 @@ entirety; that is, type @samp{1990}, not @samp{90}.
 @kindex g D @r{(Calendar mode)}
 @findex calendar-goto-day-of-year
 @kindex g w @r{(Calendar mode)}
-@findex calendar-goto-iso-week
+@findex calendar-iso-goto-week
   @kbd{g D} (@code{calendar-goto-day-of-year}) prompts for a year and
 day number, and moves to that date.  Negative day numbers count
 backward from the end of the year.  @kbd{g w}
-(@code{calendar-goto-iso-week}) prompts for a year and week number,
+(@code{calendar-iso-goto-week}) prompts for a year and week number,
 and moves to that week.
 
 @kindex o @r{(Calendar mode)}
@@ -241,23 +241,23 @@ horizontally, so that new months become visible in the window.
 
 @table @kbd
 @item >
-Scroll calendar one month forward (@code{scroll-calendar-left}).
+Scroll calendar one month forward (@code{calendar-scroll-left}).
 @item <
-Scroll calendar one month backward (@code{scroll-calendar-right}).
+Scroll calendar one month backward (@code{calendar-scroll-right}).
 @item C-v
-@itemx @key{NEXT}
+@itemx @key{next}
 Scroll calendar three months forward
-(@code{scroll-calendar-left-three-months}).
+(@code{calendar-scroll-left-three-months}).
 @item M-v
-@itemx @key{PRIOR}
+@itemx @key{prior}
 Scroll calendar three months backward
-(@code{scroll-calendar-right-three-months}).
+(@code{calendar-scroll-right-three-months}).
 @end table
 
 @kindex > @r{(Calendar mode)}
-@findex scroll-calendar-left
+@findex calendar-scroll-left
 @kindex < @r{(Calendar mode)}
-@findex scroll-calendar-right
+@findex calendar-scroll-right
   The most basic calendar scroll commands scroll by one month at a
 time.  This means that there are two months of overlap between the
 display before the command and the display after.  @kbd{>} scrolls the
@@ -265,9 +265,9 @@ calendar contents one month forward in time.  @kbd{<} scrolls the
 contents one month backwards in time.
 
 @kindex C-v @r{(Calendar mode)}
-@findex scroll-calendar-left-three-months
+@findex calendar-scroll-left-three-months
 @kindex M-v @r{(Calendar mode)}
-@findex scroll-calendar-right-three-months
+@findex calendar-scroll-right-three-months
   The commands @kbd{C-v} and @kbd{M-v} scroll the calendar by an entire
 ``screenful''---three months---in analogy with the usual meaning of
 these commands.  @kbd{C-v} makes later dates visible and @kbd{M-v} makes
@@ -276,7 +276,7 @@ repeat count; in particular, since @kbd{C-u} multiplies the next command
 by four, typing @kbd{C-u C-v} scrolls the calendar forward by a year and
 typing @kbd{C-u M-v} scrolls the calendar backward by a year.
 
-  The function keys @key{NEXT} and @key{PRIOR} are equivalent to
+  The function keys @key{next} and @key{prior} are equivalent to
 @kbd{C-v} and @kbd{M-v}, just as they are in other modes.
 
 @node Counting Days
@@ -302,13 +302,13 @@ point.
 @item p d
 Display day-in-year (@code{calendar-print-day-of-year}).
 @item C-c C-l
-Regenerate the calendar window (@code{redraw-calendar}).
+Regenerate the calendar window (@code{calendar-redraw}).
 @item SPC
 Scroll the next window up (@code{scroll-other-window}).
 @item DEL
 Scroll the next window down (@code{scroll-other-window-down}).
 @item q
-Exit from calendar (@code{exit-calendar}).
+Exit from calendar (@code{calendar-exit}).
 @end table
 
 @kindex p d @r{(Calendar mode)}
@@ -322,29 +322,30 @@ selected date.  The count of days remaining does not include that
 date.
 
 @kindex C-c C-l @r{(Calendar mode)}
-@findex redraw-calendar
+@findex calendar-redraw
   If the calendar window text gets corrupted, type @kbd{C-c C-l}
-(@code{redraw-calendar}) to redraw it.  (This can only happen if you use
+(@code{calendar-redraw}) to redraw it.  (This can only happen if you use
 non-Calendar-mode editing commands.)
 
 @kindex SPC @r{(Calendar mode)}
   In Calendar mode, you can use @kbd{SPC} (@code{scroll-other-window})
 and @kbd{DEL} (@code{scroll-other-window-down}) to scroll the other
-window up or down, respectively.  This is handy when you display a list
-of holidays or diary entries in another window.
+window (if there is one) up or down, respectively.  This is handy when
+you display a list of holidays or diary entries in another window.
 
 @kindex q @r{(Calendar mode)}
 @findex exit-calendar
-  To exit from the calendar, type @kbd{q} (@code{exit-calendar}).  This
+@vindex calendar-remove-frame-by-deleting
+  To exit from the calendar, type @kbd{q} (@code{calendar-exit}).  This
 buries all buffers related to the calendar, selecting other buffers.
 (If a frame contains a dedicated calendar window, exiting from the
-calendar iconifies that frame.)
+calendar deletes or iconifies that frame depending on the value of
+@code{calendar-remove-frame-by-deleting}.)
 
 @node Writing Calendar Files
 @section Writing Calendar Files
 
-  These packages produce files of various formats containing calendar
-and diary entries, for display purposes.
+  You can write calendars and diary entries to HTML and La@TeX{} files.
 
 @cindex calendar and HTML
   The Calendar HTML commands produce files of HTML code that contain
@@ -447,14 +448,14 @@ to.
 @section Holidays
 @cindex holidays
 
-  The Emacs calendar knows about all major and many minor holidays,
-and can display them.
+  The Emacs calendar knows about many major and minor holidays,
+and can display them.  You can add your own holidays to the default list.
 
 @table @kbd
 @item h
 Display holidays for the selected date
 (@code{calendar-cursor-holidays}).
-@item Mouse-2 Holidays
+@item Mouse-3 Holidays
 Display any holidays for the date you click on.
 @item x
 Mark holidays in the calendar window (@code{calendar-mark-holidays}).
@@ -472,10 +473,10 @@ List holidays in another window for a specified range of years.
 
 @kindex h @r{(Calendar mode)}
 @findex calendar-cursor-holidays
-@vindex view-calendar-holidays-initially
+@vindex calendar-view-holidays-initially-flag
   To see if any holidays fall on a given date, position point on that
 date in the calendar window and use the @kbd{h} command.  Alternatively,
-click on that date with @kbd{Mouse-2} and then choose @kbd{Holidays}
+click on that date with @kbd{Mouse-3} and then choose @kbd{Holidays}
 from the menu that appears.  Either way, this displays the holidays for
 that date, in the echo area if they fit there, otherwise in a separate
 window.
@@ -484,11 +485,10 @@ window.
 @findex calendar-mark-holidays
 @kindex u @r{(Calendar mode)}
 @findex calendar-unmark
-@vindex mark-holidays-in-calendar
+@vindex calendar-mark-holidays-flag
   To view the distribution of holidays for all the dates shown in the
 calendar, use the @kbd{x} command.  This displays the dates that are
-holidays in a different face (or places a @samp{*} after these dates, if
-display with multiple faces is not available).
+holidays in a different face.
 @iftex
 @inforef{Calendar Customizing, calendar-holiday-marker, emacs-xtra}.
 @end iftex
@@ -499,7 +499,7 @@ display with multiple faces is not available).
 other months that subsequently become visible by scrolling.  To turn
 marking off and erase the current marks, type @kbd{u}, which also
 erases any diary marks (@pxref{Diary}).  If the variable
-@code{mark-holidays-in-calendar} is non-@code{nil}, creating or
+@code{calendar-mark-holidays-flag} is non-@code{nil}, creating or
 updating the calendar marks holidays automatically.
 
 @kindex a @r{(Calendar mode)}
@@ -513,17 +513,17 @@ calendar window to scroll that list up and down, respectively.
   The command @kbd{M-x holidays} displays the list of holidays for the
 current month and the preceding and succeeding months; this works even
 if you don't have a calendar window.  If the variable
-@code{view-calendar-holidays-initially} is non-@code{nil}, creating
+@code{calendar-view-holidays-initially-flag} is non-@code{nil}, creating
 the calendar displays holidays in this way.  If you want the list of
 holidays centered around a different month, use @kbd{C-u M-x
 holidays}, which prompts for the month and year.
 
   The holidays known to Emacs include United States holidays and the
-major Christian, Jewish, and Islamic holidays; also the solstices and
-equinoxes.
+major Baha'i, Chinese, Christian, Islamic, and Jewish holidays; also the
+solstices and equinoxes.
 
 @findex list-holidays
-   The command @kbd{M-x list-holidays} displays the list of holidays for
+   The command @kbd{M-x holiday-list} displays the list of holidays for
 a range of years.  This function asks you for the starting and stopping
 years, and allows you to choose all the holidays or one of several
 categories of holidays.  You can use this command even if you don't have
@@ -544,12 +544,14 @@ times of sunrise and sunset for any date.
 @item S
 Display times of sunrise and sunset for the selected date
 (@code{calendar-sunrise-sunset}).
-@item Mouse-2 Sunrise/sunset
+@item Mouse-3 Sunrise/sunset
 Display times of sunrise and sunset for the date you click on.
 @item M-x sunrise-sunset
 Display times of sunrise and sunset for today's date.
 @item C-u M-x sunrise-sunset
 Display times of sunrise and sunset for a specified date.
+@item M-x calendar-sunrise-sunset-month
+Display times of sunrise and sunset for the selected month.
 @end table
 
 @kindex S @r{(Calendar mode)}
@@ -557,7 +559,7 @@ Display times of sunrise and sunset for a specified date.
 @findex sunrise-sunset
   Within the calendar, to display the @emph{local times} of sunrise and
 sunset in the echo area, move point to the date you want, and type
-@kbd{S}.  Alternatively, click @kbd{Mouse-2} on the date, then choose
+@kbd{S}.  Alternatively, click @kbd{Mouse-3} on the date, then choose
 @samp{Sunrise/sunset} from the menu that appears.  The command @kbd{M-x
 sunrise-sunset} is available outside the calendar to display this
 information for today's date or a specified date.  To specify a date
@@ -630,29 +632,28 @@ the moon.''
 @table @kbd
 @item M
 Display the dates and times for all the quarters of the moon for the
-three-month period shown (@code{calendar-phases-of-moon}).
-@item M-x phases-of-moon
+three-month period shown (@code{calendar-lunar-phases}).
+@item M-x lunar-phases
 Display dates and times of the quarters of the moon for three months around
 today's date.
 @end table
 
 @kindex M @r{(Calendar mode)}
-@findex calendar-phases-of-moon
+@findex calendar-lunar-phases
   Within the calendar, use the @kbd{M} command to display a separate
 buffer of the phases of the moon for the current three-month range.  The
 dates and times listed are accurate to within a few minutes.
 
-@findex phases-of-moon
-  Outside the calendar, use the command @kbd{M-x phases-of-moon} to
+@findex lunar-phases
+  Outside the calendar, use the command @kbd{M-x lunar-phases} to
 display the list of the phases of the moon for the current month and the
 preceding and succeeding months.  For information about a different
-month, use @kbd{C-u M-x phases-of-moon}, which prompts for the month and
+month, use @kbd{C-u M-x lunar-phases}, which prompts for the month and
 year.
 
   The dates and times given for the phases of the moon are given in
-local time (corrected for daylight saving, when appropriate); but if
-the variable @code{calendar-time-zone} is void, Coordinated Universal
-Time (the Greenwich time zone) is used.  @xref{Daylight Saving}.
+local time (corrected for daylight saving, when appropriate).
+See the discussion in the previous section.  @xref{Sunrise/Sunset}.
 
 @node Other Calendars
 @section Conversion To and From Other Calendars
@@ -672,11 +673,11 @@ Gregorian calendar did not exist.
 and from several other calendars.
 
 @menu
-* Calendar Systems::      The calendars Emacs understands
-                            (aside from Gregorian).
-* To Other Calendar::     Converting the selected date to various calendars.
-* From Other Calendar::           Moving to a date specified in another calendar.
-* Mayan Calendar::        Moving to a date specified in a Mayan calendar.
+* Calendar Systems::       The calendars Emacs understands
+                             (aside from Gregorian).
+* To Other Calendar::      Converting the selected date to various calendars.
+* From Other Calendar::    Moving to a date specified in another calendar.
+* Mayan Calendar::         Moving to a date specified in a Mayan calendar.
 @end menu
 
 @node Calendar Systems
@@ -755,6 +756,11 @@ days are named by combining one of ten ``celestial stems'' with one of
 twelve ``terrestrial branches'' for a total of sixty names that are
 repeated in a cycle of sixty.
 
+@cindex Baha'i calendar
+  The Baha'i calendar system is based on a solar cycle of 19 months with
+19 days each.  The four remaining ``intercalary'' days are placed
+between the 18th and 19th months.
+
 @node To Other Calendar
 @subsection Converting To Other Calendars
 
@@ -762,62 +768,71 @@ repeated in a cycle of sixty.
 in various other calendar systems:
 
 @table @kbd
-@item Mouse-2  Other calendars
+@item Mouse-3  Other calendars
 Display the date that you click on, expressed in various other calendars.
 @kindex p @r{(Calendar mode)}
-@findex calendar-print-iso-date
+@findex calendar-print-other-dates
+@item p o
+Display the selected date in various other calendars.
+(@code{calendar-print-other-dates}).
+@findex calendar-iso-print-date
 @item p c
 Display ISO commercial calendar equivalent for selected day
-(@code{calendar-print-iso-date}).
-@findex calendar-print-julian-date
+(@code{calendar-iso-print-date}).
+@findex calendar-julian-print-date
 @item p j
-Display Julian date for selected day (@code{calendar-print-julian-date}).
-@findex calendar-print-astro-day-number
+Display Julian date for selected day (@code{calendar-julian-print-date}).
+@findex calendar-astro-print-day-number
 @item p a
 Display astronomical (Julian) day number for selected day
-(@code{calendar-print-astro-day-number}).
-@findex calendar-print-hebrew-date
+(@code{calendar-astro-print-day-number}).
+@findex calendar-hebrew-print-date
 @item p h
-Display Hebrew date for selected day (@code{calendar-print-hebrew-date}).
-@findex calendar-print-islamic-date
+Display Hebrew date for selected day (@code{calendar-hebrew-print-date}).
+@findex calendar-islamic-print-date
 @item p i
-Display Islamic date for selected day (@code{calendar-print-islamic-date}).
-@findex calendar-print-french-date
+Display Islamic date for selected day (@code{calendar-islamic-print-date}).
+@findex calendar-french-print-date
 @item p f
 Display French Revolutionary date for selected day
-(@code{calendar-print-french-date}).
-@findex calendar-print-chinese-date
+(@code{calendar-french-print-date}).
+@findex calendar-bahai-print-date
+@item p b
+Display Baha'i date for selected day
+(@code{calendar-bahai-print-date}).
+@findex calendar-chinese-print-date
 @item p C
 Display Chinese date for selected day
-(@code{calendar-print-chinese-date}).
-@findex calendar-print-coptic-date
+(@code{calendar-chinese-print-date}).
+@findex calendar-coptic-print-date
 @item p k
 Display Coptic date for selected day
-(@code{calendar-print-coptic-date}).
-@findex calendar-print-ethiopic-date
+(@code{calendar-coptic-print-date}).
+@findex calendar-ethiopic-print-date
 @item p e
 Display Ethiopic date for selected day
-(@code{calendar-print-ethiopic-date}).
-@findex calendar-print-persian-date
+(@code{calendar-ethiopic-print-date}).
+@findex calendar-persian-print-date
 @item p p
 Display Persian date for selected day
-(@code{calendar-print-persian-date}).
-@findex calendar-print-mayan-date
+(@code{calendar-persian-print-date}).
+@findex calendar-mayan-print-date
 @item p m
-Display Mayan date for selected day (@code{calendar-print-mayan-date}).
+Display Mayan date for selected day (@code{calendar-mayan-print-date}).
 @end table
 
-  If you are using X, the easiest way to translate a date into other
-calendars is to click on it with @kbd{Mouse-2}, then choose @kbd{Other
-calendars} from the menu that appears.  This displays the equivalent
-forms of the date in all the calendars Emacs understands, in the form of
-a menu.  (Choosing an alternative from this menu doesn't actually do
-anything---the menu is used only for display.)
+  If you are using a graphic display, the easiest way to translate a
+date into other calendars is to click on it with @kbd{Mouse-3}, then
+choose @kbd{Other calendars} from the menu that appears.  This displays
+the equivalent forms of the date in all the calendars Emacs understands,
+in the form of a menu.  (Choosing an alternative from this menu doesn't
+actually do anything---the menu is used only for display.)
 
   Otherwise, move point to the date you want to convert, then type the
 appropriate command starting with @kbd{p} from the table above.  The
 prefix @kbd{p} is a mnemonic for ``print,'' since Emacs ``prints'' the
-equivalent date in the echo area.
+equivalent date in the echo area. @kbd{p o} displays the
+date in all forms known to Emacs.
 
 @node From Other Calendar
 @subsection Converting From Other Calendars
@@ -827,66 +842,71 @@ to.  This section describes the commands for doing this using calendars
 other than Mayan; for the Mayan calendar, see the following section.
 
 @kindex g @var{char} @r{(Calendar mode)}
-@findex calendar-goto-iso-date
-@findex calendar-goto-iso-week
-@findex calendar-goto-julian-date
-@findex calendar-goto-astro-day-number
-@findex calendar-goto-hebrew-date
-@findex calendar-goto-islamic-date
-@findex calendar-goto-french-date
-@findex calendar-goto-chinese-date
-@findex calendar-goto-persian-date
-@findex calendar-goto-coptic-date
-@findex calendar-goto-ethiopic-date
+@findex calendar-iso-goto-date
+@findex calendar-iso-goto-week
+@findex calendar-julian-goto-date
+@findex calendar-astro-goto-day-number
+@findex calendar-bahai-goto-date
+@findex calendar-hebrew-goto-date
+@findex calendar-islamic-goto-date
+@findex calendar-french-goto-date
+@findex calendar-chinese-goto-date
+@findex calendar-persian-goto-date
+@findex calendar-coptic-goto-date
+@findex calendar-ethiopic-goto-date
 @table @kbd
 @item g c
 Move to a date specified in the ISO commercial calendar
-(@code{calendar-goto-iso-date}).
+(@code{calendar-iso-goto-date}).
 @item g w
 Move to a week specified in the ISO commercial calendar
-(@code{calendar-goto-iso-week}).
+(@code{calendar-iso-goto-week}).
 @item g j
 Move to a date specified in the Julian calendar
-(@code{calendar-goto-julian-date}).
+(@code{calendar-julian-goto-date}).
 @item g a
 Move to a date specified with an astronomical (Julian) day number
-(@code{calendar-goto-astro-day-number}).
+(@code{calendar-astro-goto-day-number}).
+@item g b
+Move to a date specified in the Baha'i calendar
+(@code{calendar-bahai-goto-date}).
 @item g h
 Move to a date specified in the Hebrew calendar
-(@code{calendar-goto-hebrew-date}).
+(@code{calendar-hebrew-goto-date}).
 @item g i
 Move to a date specified in the Islamic calendar
-(@code{calendar-goto-islamic-date}).
+(@code{calendar-islamic-goto-date}).
 @item g f
 Move to a date specified in the French Revolutionary calendar
-(@code{calendar-goto-french-date}).
+(@code{calendar-french-goto-date}).
 @item g C
 Move to a date specified in the Chinese calendar
-(@code{calendar-goto-chinese-date}).
+(@code{calendar-chinese-goto-date}).
 @item g p
 Move to a date specified in the Persian calendar
-(@code{calendar-goto-persian-date}).
+(@code{calendar-persian-goto-date}).
 @item g k
 Move to a date specified in the Coptic calendar
-(@code{calendar-goto-coptic-date}).
+(@code{calendar-coptic-goto-date}).
 @item g e
 Move to a date specified in the Ethiopic calendar
-(@code{calendar-goto-ethiopic-date}).
+(@code{calendar-ethiopic-goto-date}).
 @end table
 
   These commands ask you for a date on the other calendar, move point to
 the Gregorian calendar date equivalent to that date, and display the
 other calendar's date in the echo area.  Emacs uses strict completion
-(@pxref{Completion}) whenever it asks you to type a month name, so you
+(@pxref{Strict Completion}) whenever it asks you to type a month name, so you
 don't have to worry about the spelling of Hebrew, Islamic, or French names.
 
-@findex list-yahrzeit-dates
+@c FIXME move?
+@findex calendar-hebrew-list-yahrzeits
 @cindex yahrzeits
   One common question concerning the Hebrew calendar is the computation
 of the anniversary of a date of death, called a ``yahrzeit.''  The Emacs
 calendar includes a facility for such calculations.  If you are in the
-calendar, the command @kbd{M-x list-yahrzeit-dates} asks you for a
-range of years and then displays a list of the yahrzeit dates for those
+calendar, the command @kbd{M-x calendar-hebrew-list-yahrzeits} asks you for
+range of years and then displays a list of the yahrzeit dates for those
 years for the date given by point.  If you are not in the calendar,
 this command first asks you for the date of death and the range of
 years, and then displays the list of yahrzeit dates.
@@ -899,25 +919,25 @@ years, and then displays the list of yahrzeit dates.
 @table @kbd
 @item g m l
 Move to a date specified by the long count calendar
-(@code{calendar-goto-mayan-long-count-date}).
+(@code{calendar-mayan-goto-long-count-date}).
 @item g m n t
 Move to the next occurrence of a place in the
-tzolkin calendar (@code{calendar-next-tzolkin-date}).
+tzolkin calendar (@code{calendar-mayan-next-tzolkin-date}).
 @item g m p t
 Move to the previous occurrence of a place in the
-tzolkin calendar (@code{calendar-previous-tzolkin-date}).
+tzolkin calendar (@code{calendar-mayan-previous-tzolkin-date}).
 @item g m n h
 Move to the next occurrence of a place in the
-haab calendar (@code{calendar-next-haab-date}).
+haab calendar (@code{calendar-mayan-next-haab-date}).
 @item g m p h
 Move to the previous occurrence of a place in the
-haab calendar (@code{calendar-previous-haab-date}).
+haab calendar (@code{calendar-mayan-previous-haab-date}).
 @item g m n c
 Move to the next occurrence of a place in the
-calendar round (@code{calendar-next-calendar-round-date}).
+calendar round (@code{calendar-mayan-next-calendar-round-date}).
 @item g m p c
 Move to the previous occurrence of a place in the
-calendar round (@code{calendar-previous-calendar-round-date}).
+calendar round (@code{calendar-mayan-previous-calendar-round-date}).
 @end table
 
 @cindex Mayan long count
@@ -930,7 +950,7 @@ The @dfn{long count} is a counting of days with these units:
 @end display
 
 @kindex g m @r{(Calendar mode)}
-@findex calendar-goto-mayan-long-count-date
+@findex calendar-mayan-goto-long-count-date
 @noindent
 Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
 tun, 16 uinal, and 6 kin.  The Emacs calendar can handle Mayan long
@@ -938,8 +958,8 @@ count dates as early as 7.17.18.13.3, but no earlier.  When you use the
 @kbd{g m l} command, type the Mayan long count date with the baktun,
 katun, tun, uinal, and kin separated by periods.
 
-@findex calendar-previous-tzolkin-date
-@findex calendar-next-tzolkin-date
+@findex calendar-mayan-previous-tzolkin-date
+@findex calendar-mayan-next-tzolkin-date
 @cindex Mayan tzolkin calendar
   The Mayan tzolkin calendar is a cycle of 260 days formed by a pair of
 independent cycles of 13 and 20 days.  Since this cycle repeats
@@ -949,8 +969,8 @@ previous tzolkin date; Emacs asks you for a tzolkin date and moves point
 to the previous occurrence of that date.  Similarly, type @kbd{g m n t}
 to go to the next occurrence of a tzolkin date.
 
-@findex calendar-previous-haab-date
-@findex calendar-next-haab-date
+@findex calendar-mayan-previous-haab-date
+@findex calendar-mayan-next-haab-date
 @cindex Mayan haab calendar
   The Mayan haab calendar is a cycle of 365 days arranged as 18 months
 of 20 days each, followed a 5-day monthless period.  Like the tzolkin
@@ -962,8 +982,8 @@ Similarly, type @kbd{g m n h} to go to the next occurrence of a haab
 date.
 
 @c This is omitted because it is too long for smallbook format.
-@c @findex calendar-previous-calendar-round-date
-@findex calendar-next-calendar-round-date
+@c @findex calendar-mayan-previous-calendar-round-date
+@findex calendar-mayan-next-calendar-round-date
 @cindex Mayan calendar round
   The Maya also used the combination of the tzolkin date and the haab
 date.  This combination is a cycle of about 52 years called a
@@ -1019,8 +1039,8 @@ entries.
 @menu
 * Displaying the Diary::   Viewing diary entries and associated calendar dates.
 * Format of Diary File::   Entering events in your diary.
-* Date Formats::          Various ways you can specify dates.
-* Adding to Diary::       Commands to create diary entries.
+* Date Formats::           Various ways you can specify dates.
+* Adding to Diary::        Commands to create diary entries.
 * Special Diary Entries::  Anniversaries, blocks of dates, cyclic entries, etc.
 @end menu
 
@@ -1028,22 +1048,23 @@ entries.
 @subsection Displaying the Diary
 
   Once you have created a diary file, you can use the calendar to view
-it.  You can also view today's events outside of Calendar mode.
+it.  You can also view today's events outside of Calendar mode.  In the
+following, key bindings refer to the Calendar buffer.
 
 @table @kbd
 @item d
 Display all diary entries for the selected date
 (@code{diary-view-entries}).
-@item Mouse-2 Diary
+@item Mouse-3 Diary
 Display all diary entries for the date you click on.
 @item s
 Display the entire diary file (@code{diary-show-all-entries}).
 @item m
 Mark all visible dates that have diary entries
-(@code{mark-diary-entries}).
+(@code{diary-mark-entries}).
 @item u
 Unmark the calendar window (@code{calendar-unmark}).
-@item M-x print-diary-entries
+@item M-x diary-print-entries
 Print hard copy of the diary display as it appears.
 @item M-x diary
 Display all diary entries for today's date.
@@ -1053,40 +1074,47 @@ Mail yourself email reminders about upcoming diary entries.
 
 @kindex d @r{(Calendar mode)}
 @findex diary-view-entries
-@vindex view-diary-entries-initially
+@vindex calendar-view-diary-initially-flag
   Displaying the diary entries with @kbd{d} shows in a separate window
 the diary entries for the selected date in the calendar.  The mode line
-of the new window shows the date of the diary entries and any holidays
-that fall on that date.  If you specify a numeric argument with @kbd{d},
-it shows all the diary entries for that many successive days.  Thus,
-@kbd{2 d} displays all the entries for the selected date and for the
-following day.
+of the new window shows the date of the diary entries.  Holidays are
+shown either in the buffer or in the mode line, depending on the display
+method you choose
+@iftex
+(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Diary Display}).
+@end ifnottex
+If you specify a numeric argument with @kbd{d}, it shows all the diary
+entries for that many successive days.  Thus, @kbd{2 d} displays all the
+entries for the selected date and for the following day.
 
   Another way to display the diary entries for a date is to click
-@kbd{Mouse-2} on the date, and then choose @kbd{Diary entries} from
+@kbd{Mouse-3} on the date, and then choose @kbd{Diary entries} from
 the menu that appears.  If the variable
-@code{view-diary-entries-initially} is non-@code{nil}, creating the
+@code{calendar-view-diary-initially-flag} is non-@code{nil}, creating the
 calendar lists the diary entries for the current date (provided the
 current date is visible).
 
 @kindex m @r{(Calendar mode)}
-@findex mark-diary-entries
-@vindex mark-diary-entries-in-calendar
+@findex diary-mark-entries
+@vindex calendar-mark-diary-entries-flag
   To get a broader view of which days are mentioned in the diary, use
-the @kbd{m} command.  This displays the dates that have diary entries in
-a different face (or places a @samp{+} after these dates, if display
-with multiple faces is not available).
+the @kbd{m} command.  This marks the dates that have diary entries in
+a different face.
 @iftex
 @inforef{Calendar Customizing, diary-entry-marker, emacs-xtra}.
 @end iftex
 @ifnottex
 @xref{Calendar Customizing, diary-entry-marker}.
 @end ifnottex
+
   The command applies both to the currently visible months and to
 other months that subsequently become visible by scrolling.  To turn
 marking off and erase the current marks, type @kbd{u}, which also
 turns off holiday marks (@pxref{Holidays}).  If the variable
-@code{mark-diary-entries-in-calendar} is non-@code{nil}, creating or
+@code{calendar-mark-diary-entries-flag} is non-@code{nil}, creating or
 updating the calendar marks diary dates automatically.
 
 @kindex s @r{(Calendar mode)}
@@ -1094,30 +1122,21 @@ updating the calendar marks diary dates automatically.
   To see the full diary file, rather than just some of the entries, use
 the @kbd{s} command.
 
-  Display of selected diary entries uses the selective display feature
-to hide entries that don't apply.  The diary buffer as you see it is
-an illusion, so simply printing the buffer does not print what you see
-on your screen.  There is a special command to print hard copy of the
-diary buffer @emph{as it appears}; this command is @kbd{M-x
-print-diary-entries}.  It sends the data directly to the printer.  You
-can customize it like @code{lpr-region} (@pxref{Printing}).
-
 @findex diary
   The command @kbd{M-x diary} displays the diary entries for the current
 date, independently of the calendar display, and optionally for the next
-few days as well; the variable @code{number-of-diary-entries} specifies
+few days as well; the variable @code{diary-number-of-entries} specifies
 how many days to include.
 @iftex
 @inforef{Diary Customizing,, emacs-xtra}.
 @end iftex
 @ifnottex
-@xref{Diary Customizing, number-of-diary-entries}.
+@xref{Diary Customizing, diary-number-of-entries}.
 @end ifnottex
 
   If you put @code{(diary)} in your @file{.emacs} file, this
 automatically displays a window with the day's diary entries, when you
-enter Emacs.  The mode line of the displayed window shows the date and
-any holidays that fall on that date.
+enter Emacs.
 
 @findex diary-mail-entries
 @vindex diary-mail-days
@@ -1148,17 +1167,9 @@ first must begin with whitespace to indicate they continue a previous
 entry.  Lines that do not begin with valid dates and do not continue a
 preceding entry are ignored.
 
-  You can inhibit the marking of certain diary entries in the calendar
-window; to do this, insert an ampersand (@samp{&}) at the beginning of
-the entry, before the date.  This has no effect on display of the entry
-in the diary window; it affects only marks on dates in the calendar
-window.  Nonmarking entries are especially useful for generic entries
-that would otherwise mark many different dates.
-
-  If the first line of a diary entry consists only of the date or day
-name with no following blanks or punctuation, then the diary window
-display doesn't include that line; only the continuation lines appear.
-For example, this entry:
+  You can also use a format where the first line of a diary entry
+consists only of the date or day name (with no following blanks or
+punctuation).  For example:
 
 @example
 02/11/1989
@@ -1171,24 +1182,27 @@ For example, this entry:
 @end example
 
 @noindent
-appears in the diary window without the date line at the beginning.
-This style of entry looks neater when you display just a single day's
-entries, but can cause confusion if you ask for more than one day's
-entries.
-
-  You can edit the diary entries as they appear in the window, but it is
-important to remember that the buffer displayed contains the @emph{entire}
-diary file, with portions of it concealed from view.  This means, for
-instance, that the @kbd{C-f} (@code{forward-char}) command can put point
-at what appears to be the end of the line, but what is in reality the
-middle of some concealed line.
+This entry will have a different appearance if you use the simple diary
+display
+@iftex
+(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Diary Display}).
+@end ifnottex
+The simple diary display omits the date line at the beginning; only the
+continuation lines appear.  This style of entry looks neater when you
+display just a single day's entries, but can cause confusion if you ask
+for more than one day's entries.
 
-  @emph{Be careful when editing the diary entries!}  Inserting
-additional lines or adding/deleting characters in the middle of a
-visible line cannot cause problems, but editing at the end of a line may
-not do what you expect.  Deleting a line may delete other invisible
-entries that follow it.  Before editing the diary, it is best to display
-the entire file with @kbd{s} (@code{diary-show-all-entries}).
+@vindex diary-nonmarking-symbol
+  You can inhibit the marking of certain diary entries in the calendar
+window; to do this, insert an ampersand @code{diary-nonmarking-symbol}
+(default @samp{&}) at the beginning of the entry, before the date.  This
+has no effect on display of the entry in the diary window; it affects
+only marks on dates in the calendar window.  Nonmarking entries are
+especially useful for generic entries that would otherwise mark many
+different dates.
 
 @node Date Formats
 @subsection Date Formats
@@ -1196,7 +1210,7 @@ the entire file with @kbd{s} (@code{diary-show-all-entries}).
   Here are some sample diary entries, illustrating different ways of
 formatting a date.  The examples all show dates in American order
 (month, day, year), but Calendar mode supports European order (day,
-month, year) as an option.
+month, year) and ISO order (year, month, day) as options.
 
 @example
 4/20/93  Switch-over to new tabulation system
@@ -1221,8 +1235,9 @@ is, you can use @samp{11/12/1989} or @samp{11/12/89}.
   Dates can also have the form @samp{@var{monthname} @var{day}} or
 @samp{@var{monthname} @var{day}, @var{year}}, where the month's name can
 be spelled in full or abbreviated (with or without a period).  The
-preferred abbreviations can be controlled using the variables
-@code{calendar-abbrev-length}, @code{calendar-month-abbrev-array}, and
+preferred abbreviations for month and day names can be set using
+the variables @code{calendar-abbrev-length},
+@code{calendar-month-abbrev-array}, and
 @code{calendar-day-abbrev-array}.  The default is to use the first three
 letters of a name as its abbreviation.  Case is not significant.
 
@@ -1234,54 +1249,58 @@ this matches any month, day, or year, respectively.  Thus, a diary entry
 @samp{3/*/*} matches any day in March of any year; so does @samp{march
 *}.
 
-@vindex european-calendar-style
-@findex european-calendar
-@findex american-calendar
-  If you prefer the European style of writing dates---in which the day
-comes before the month---type @kbd{M-x european-calendar} while in the
-calendar, or set the variable @code{european-calendar-style} to @code{t}
-with @kbd{M-x customize}, or @emph{before} using any calendar or diary
-command.  This mode interprets all dates in the diary in the European
-manner, and also uses European style for displaying diary dates.  (Note
-that there is no comma after the @var{monthname} in the European style.)
-To go back to the (default) American style of writing dates, type
-@kbd{M-x american-calendar}.
+@vindex calendar-date-style
+@findex calendar-set-date-style
+  If you prefer the European style of writing dates (in which the day
+comes before the month), or the ISO style (in which the order is year,
+month, day), type @kbd{M-x calendar-set-date-style} while in the
+calendar, or customize the variable @code{calendar-date-style}.  This
+affects how diary dates are interpreted, date display, and the order in
+which some commands expect their arguments to be given.
 
   You can use the name of a day of the week as a generic date which
 applies to any date falling on that day of the week.  You can abbreviate
-the day of the week to three letters (with or without a period) or spell
-it in full; case is not significant.
+the day of the week as described above, or spell it in full; case is not
+significant.
 
 @node Adding to Diary
 @subsection Commands to Add to the Diary
 
   While in the calendar, there are several commands to create diary
-entries:
+entries.  The basic commands are listed here; more sophisticated
+commands are in the next section (@pxref{Special Diary Entries}).
+Entries can also be based on non-Gregorian calendars.
+@iftex
+@inforef{Non-Gregorian Diary,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Non-Gregorian Diary}.
+@end ifnottex
 
 @table @kbd
 @item i d
-Add a diary entry for the selected date (@code{insert-diary-entry}).
+Add a diary entry for the selected date (@code{diary-insert-entry}).
 @item i w
-Add a diary entry for the selected day of the week (@code{insert-weekly-diary-entry}).
+Add a diary entry for the selected day of the week (@code{diary-insert-weekly-entry}).
 @item i m
-Add a diary entry for the selected day of the month (@code{insert-monthly-diary-entry}).
+Add a diary entry for the selected day of the month (@code{diary-insert-monthly-entry}).
 @item i y
-Add a diary entry for the selected day of the year (@code{insert-yearly-diary-entry}).
+Add a diary entry for the selected day of the year (@code{diary-insert-yearly-entry}).
 @end table
 
 @kindex i d @r{(Calendar mode)}
-@findex insert-diary-entry
+@findex diary-insert-entry
   You can make a diary entry for a specific date by selecting that date
 in the calendar window and typing the @kbd{i d} command.  This command
 displays the end of your diary file in another window and inserts the
 date; you can then type the rest of the diary entry.
 
 @kindex i w @r{(Calendar mode)}
-@findex insert-weekly-diary-entry
+@findex diary-insert-weekly-entry
 @kindex i m @r{(Calendar mode)}
-@findex insert-monthly-diary-entry
+@findex diary-insert-monthly-entry
 @kindex i y @r{(Calendar mode)}
-@findex insert-yearly-diary-entry
+@findex diary-insert-yearly-entry
   If you want to make a diary entry that applies to a specific day of
 the week, select that day of the week (any occurrence will do) and type
 @kbd{i w}.  This inserts the day-of-week as a generic date; you can then
@@ -1298,7 +1317,7 @@ For example, @kbd{C-u i w} makes a nonmarking weekly diary entry.
 exiting Emacs.  Saving the diary file after using any of the above
 insertion commands will automatically update the diary marks in the
 calendar window, if appropriate.  You can use the command
-@code{redraw-calendar} to force an update at any time.
+@code{calendar-redraw} to force an update at any time.
 
 @node Special Diary Entries
 @subsection Special Diary Entries
@@ -1317,17 +1336,17 @@ sexp entries:
 @table @kbd
 @item i a
 Add an anniversary diary entry for the selected date
-(@code{insert-anniversary-diary-entry}).
+(@code{diary-insert-anniversary-entry}).
 @item i b
 Add a block diary entry for the current region
-(@code{insert-block-diary-entry}).
+(@code{diary-insert-block-entry}).
 @item i c
 Add a cyclic diary entry starting at the date
-(@code{insert-cyclic-diary-entry}).
+(@code{diary-insert-cyclic-entry}).
 @end table
 
 @kindex i a @r{(Calendar mode)}
-@findex insert-anniversary-diary-entry
+@findex diary-insert-anniversary-entry
   If you want to make a diary entry that applies to the anniversary of a
 specific date, move point to that date and use the @kbd{i a} command.
 This displays the end of your diary file in another window and inserts
@@ -1341,10 +1360,10 @@ entry.  The entry looks like this:
 
 @noindent
 This entry applies to October 31 in any year after 1948; @samp{10 31
-1948} specifies the date.  (If you are using the European calendar
-style, the month and day are interchanged.)  The reason this expression
-requires a beginning year is that advanced diary functions can use it to
-calculate the number of elapsed years.
+1948} specifies the date.  (If you are using the European or ISO
+calendar style, the input order of month, day and year is different.)
+The reason this expression requires a beginning year is that advanced
+diary functions can use it to calculate the number of elapsed years.
 
   A @dfn{block} diary entry applies to a specified range of consecutive
 dates.  Here is a block diary entry that applies to all dates from June
@@ -1357,18 +1376,18 @@ dates.  Here is a block diary entry that applies to all dates from June
 
 @noindent
 The @samp{6 24 1990} indicates the starting date and the @samp{7 10 1990}
-indicates the stopping date.  (Again, if you are using the European calendar
-style, the month and day are interchanged.)
+indicates the stopping date.  (Again, if you are using the European or ISO
+calendar style, the input order of month, day and year is different.)
 
 @kindex i b @r{(Calendar mode)}
-@findex insert-block-diary-entry
+@findex diary-insert-block-entry
   To insert a block entry, place point and the mark on the two
 dates that begin and end the range, and type @kbd{i b}.  This command
 displays the end of your diary file in another window and inserts the
 block description; you can then type the diary entry.
 
 @kindex i c @r{(Calendar mode)}
-@findex insert-cyclic-diary-entry
+@findex diary-insert-cyclic-entry
    @dfn{Cyclic} diary entries repeat after a fixed interval of days.  To
 create one, select the starting date and use the @kbd{i c} command.  The
 command prompts for the length of interval, then inserts the entry,
@@ -1382,7 +1401,8 @@ which looks like this:
 @noindent
 This entry applies to March 1, 1990 and every 50th day following;
 @samp{3 1 1990} specifies the starting date.  (If you are using the
-European calendar style, the month and day are interchanged.)
+European or ISO calendar style, the input order of month, day and year
+is different.)
 
   All three of these commands make marking diary entries.  To insert a
 nonmarking entry, give a numeric argument to the command.  For example,
@@ -1422,7 +1442,7 @@ can perform arbitrary computations to determine when they apply.
 @inforef{Sexp Diary Entries,, emacs-xtra}.
 @end iftex
 @ifnottex
-@inforef{Sexp Diary Entries}.
+@xref{Sexp Diary Entries}.
 @end ifnottex
 
 @node Appointments
@@ -1453,12 +1473,12 @@ give the names of functions used to create and destroy the window,
 respectively.
 
 @findex appt-activate
-  To enable appointment notification, use the command @kbd{M-x
-appt-activate}.  With a positive argument, it enables notification;
-with a negative argument, it disables notification; with no argument,
-it toggles.  Enabling notification also sets up an appointment list
-for today from the diary file, giving all diary entries found with
-recognizable times of day, and reminds you just before each of them.
+  To enable appointment notification, type @kbd{M-x appt-activate}.
+With a positive argument, it enables notification; with a negative
+argument, it disables notification; with no argument, it toggles.
+Enabling notification also sets up an appointment list for today from
+the diary file, giving all diary entries found with recognizable times
+of day, and reminds you just before each of them.
 
   For example, suppose the diary file contains these lines:
 
@@ -1469,17 +1489,21 @@ Monday
 @end example
 
 @vindex appt-message-warning-time
+@vindex appt-warning-time-regexp
 @noindent
 Then on Mondays, you will be reminded at around 9:20am about your
 coffee break and at around 11:50am about lunch.  The variable
-@code{appt-message-warning-time} specifies how many minutes in advance
-to warn you; its default value is 12 (12 minutes).
+@code{appt-message-warning-time} specifies how many minutes (default 12)
+in advance to warn you.  This is a default warning time.  Each
+appointment can specify a different warning time by adding a piece
+matching @code{appt-warning-time-regexp} (see that variable's
+documentation for details).
 
   You can write times in am/pm style (with @samp{12:00am} standing
 for midnight and @samp{12:00pm} standing for noon), or 24-hour
 European/military style.  You need not be consistent; your diary file
-can have a mixture of the two styles.  Times must be at the beginning
-of lines if they are to be recognized.
+can have a mixture of the two styles.  Times must be at the beginning of
+diary entries if they are to be recognized.
 
 @vindex appt-display-diary
   Emacs updates the appointments list from the diary file
@@ -1487,7 +1511,14 @@ automatically just after midnight.  You can force an update at any
 time by re-enabling appointment notification.  Both these actions also
 display the day's diary buffer, unless you set
 @code{appt-display-diary} to @code{nil}.  The appointments list is
-also updated whenever the diary file is saved.
+also updated whenever the diary file (or a file it includes; see
+@iftex
+@inforef{Fancy Diary Display,, emacs-xtra})
+@end iftex
+@ifnottex
+@ref{Fancy Diary Display})
+@end ifnottex
+is saved.
 
 @findex appt-add
 @findex appt-delete
@@ -1516,11 +1547,11 @@ diary file and iCalendar files, which are defined in ``RFC
 2445---Internet Calendaring and Scheduling Core Object Specification
 (iCalendar)'' (as well as the earlier vCalendar format).
 
-  Importing works for ``ordinary'' (i.e. non-recurring) events, but
-(at present) may not work correctly (if at all) for recurring events.
-Exporting of diary files into iCalendar files should work correctly
-for most diary entries.  This feature is a work in progress, so the
-commands may evolve in future.
+@c  Importing works for ``ordinary'' (i.e. non-recurring) events, but
+@c (at present) may not work correctly (if at all) for recurring events.
+@c Exporting of diary files into iCalendar files should work correctly
+@c for most diary entries.  This feature is a work in progress, so the
+@c commands may evolve in future.
 
 @findex icalendar-import-buffer
   The command @code{icalendar-import-buffer} extracts
@@ -1632,7 +1663,7 @@ variables' values are 120.
 @cindex summing time intervals
 @cindex timeclock
 
-  The timeclock feature adds up time intervals, so you can (for
+  The timeclock package adds up time intervals, so you can (for
 instance) keep track of how much time you spend working on particular
 projects.
 
@@ -1662,11 +1693,10 @@ workday in the mode line, either customize the
 @vindex timeclock-ask-before-exiting
   Terminating the current Emacs session might or might not mean that
 you have stopped working on the project and, by default, Emacs asks
-you.  You can, however, set the value of the variable
-@code{timeclock-ask-before-exiting} to @code{nil} (via @kbd{M-x
-customize}) to avoid the question; then, only an explicit @kbd{M-x
-timeclock-out} or @kbd{M-x timeclock-change} will tell Emacs that the
-current interval is over.
+you.  You can, however, set customize the value of the variable
+@code{timeclock-ask-before-exiting} to @code{nil} to avoid the question;
+then, only an explicit @kbd{M-x timeclock-out} or @kbd{M-x
+timeclock-change} will tell Emacs that the current interval is over.
 
 @cindex @file{.timelog} file
 @vindex timeclock-file
@@ -1682,7 +1712,3 @@ data in Emacs from the file.
 @ifnottex
 @include cal-xtra.texi
 @end ifnottex
-
-@ignore
-   arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92
-@end ignore