/xemacs-packages-extra-20110502/xemacs-packages/calendar/calendar.el
Emacs Lisp | 3255 lines | 2512 code | 404 blank | 339 comment | 172 complexity | a0d5ad6b25150721e8883a931678832b MD5 | raw file
Possible License(s): MPL-2.0, LGPL-2.1, GPL-2.0, MPL-2.0-no-copyleft-exception
Large files files are truncated, but you can click here to view the full file
- ;;; calendar.el --- calendar functions
- ;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997,
- ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
- ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
- ;; Maintainer: Glenn Morris <rgm@gnu.org>
- ;; Keywords: calendar
- ;; Human-Keywords: calendar, Gregorian calendar, diary, holidays
- ;; This file is part of XEmacs.
- ;; XEmacs is free software; you can redistribute it and/or modify
- ;; it under the terms of the GNU General Public License as published by
- ;; the Free Software Foundation; either version 2, or (at your option)
- ;; any later version.
- ;; XEmacs is distributed in the hope that it will be useful,
- ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ;; GNU General Public License for more details.
- ;; You should have received a copy of the GNU General Public License
- ;; along with XEmacs; see the file COPYING. If not, write to the
- ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- ;; Boston, MA 02110-1301, USA.
- ;;; Synched up with: FSF Emacs 22 CVS 2007-03-30
- ;;; Commentary:
- ;; This collection of functions implements a calendar window. It
- ;; generates a calendar for the current month, together with the
- ;; previous and coming months, or for any other three-month period.
- ;; The calendar can be scrolled forward and backward in the window to
- ;; show months in the past or future; the cursor can move forward and
- ;; backward by days, weeks, or months, making it possible, for
- ;; instance, to jump to the date a specified number of days, weeks, or
- ;; months from the date under the cursor. The user can display a list
- ;; of holidays and other notable days for the period shown; the
- ;; notable days can be marked on the calendar, if desired. The user
- ;; can also specify that dates having corresponding diary entries (in
- ;; a file that the user specifies) be marked; the diary entries for
- ;; any date can be viewed in a separate window. The diary and the
- ;; notable days can be viewed independently of the calendar. Dates
- ;; can be translated from the (usual) Gregorian calendar to the day of
- ;; the year/days remaining in year, to the ISO commercial calendar, to
- ;; the Julian (old style) calendar, to the Hebrew calendar, to the
- ;; Islamic calendar, to the Baha'i calendar, to the French
- ;; Revolutionary calendar, to the Mayan calendar, to the Chinese
- ;; calendar, to the Coptic calendar, to the Ethiopic calendar, and to
- ;; the astronomical (Julian) day number. When floating point is
- ;; available, times of sunrise/sunset can be displayed, as can the
- ;; phases of the moon. Appointment notification for diary entries is
- ;; available. Calendar printing via LaTeX is available.
- ;; The following files are part of the calendar/diary code:
- ;; appt.el Appointment notification
- ;; cal-china.el Chinese calendar
- ;; cal-coptic.el Coptic/Ethiopic calendars
- ;; cal-dst.el Daylight saving time rules
- ;; cal-hebrew.el Hebrew calendar
- ;; cal-islam.el Islamic calendar
- ;; cal-bahai.el Baha'i calendar
- ;; cal-iso.el ISO calendar
- ;; cal-julian.el Julian/astronomical calendars
- ;; cal-mayan.el Mayan calendars
- ;; cal-menu.el Menu support
- ;; cal-move.el Movement in the calendar
- ;; cal-persia.el Persian calendar
- ;; cal-tex.el Calendars in LaTeX
- ;; cal-x.el X-windows dedicated frame functions
- ;; diary-lib.el Diary functions
- ;; holidays.el Holiday functions
- ;; cal-french.el French Revolutionary calendar
- ;; lunar.el Phases of the moon
- ;; solar.el Sunrise/sunset, equinoxes/solstices
- ;; Technical details of all the calendrical calculations can be found in
- ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
- ;; and Nachum Dershowitz, Cambridge University Press (2001).
- ;; An earlier version of the technical details appeared in
- ;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
- ;; Software--Practice and Experience, Volume 20, Number 9 (September, 1990),
- ;; pages 899-928, and in ``Calendrical Calculations, Part II: Three Historical
- ;; Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. Clamen,
- ;; Software--Practice and Experience, Volume 23, Number 4 (April, 1993),
- ;; pages 383-404.
- ;; Hard copies of these two papers can be obtained by sending email to
- ;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and
- ;; the message BODY containing your mailing address (snail).
- ;; Comments, corrections, and improvements should be sent to
- ;; Edward M. Reingold Department of Computer Science
- ;; (217) 333-6733 University of Illinois at Urbana-Champaign
- ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
- ;; Urbana, Illinois 61801
- ;;; Code:
- (eval-and-compile
- (require 'cal-compat))
- (defvar displayed-month)
- (defvar displayed-year)
- (defvar calendar-month-name-array)
- (defvar calendar-starred-day)
- (defun calendar-version ()
- (interactive)
- (message "Version 6, October 12, 1995"))
- (defgroup calendar nil
- "Calendar and time management support."
- :group 'applications)
- (defgroup diary nil
- "Emacs diary."
- :group 'calendar)
- (defgroup appt nil
- "Appointment notification."
- :tag "Appointments"
- :group 'calendar)
- (defgroup holidays nil
- "Holidays support in calendar."
- :group 'calendar
- :prefix "calendar-"
- :group 'local)
- (defgroup chinese-calendar nil
- "Chinese calendar support."
- :group 'calendar)
- (defgroup calendar-tex nil
- "Options for printing calendar with LaTeX."
- :prefix "cal-tex-"
- :group 'calendar)
- (defgroup calendar-hooks nil
- "Calendar hooks."
- :prefix "calendar-"
- :group 'calendar)
- ;;;###autoload
- (defconst calendar-buffer "*Calendar*"
- "Name of the buffer used for the calendar.")
- ;;;###autoload
- (defcustom calendar-offset 0
- "The offset of the principal month from the center of the calendar window.
- 0 means the principal month is in the center (default), -1 means on the left,
- +1 means on the right. Larger (or smaller) values push the principal month off
- the screen."
- :type 'integer
- :group 'calendar)
- ;;;###autoload
- (defcustom view-diary-entries-initially nil
- "Non-nil means display current date's diary entries on entry to calendar.
- The diary is displayed in another window when the calendar is first displayed,
- if the current date is visible. The number of days of diary entries displayed
- is governed by the variable `number-of-diary-entries'. This variable can
- be overridden by the value of `calendar-setup'."
- :type 'boolean
- :group 'diary)
- ;;;###autoload
- (defcustom mark-diary-entries-in-calendar nil
- "Non-nil means mark dates with diary entries, in the calendar window.
- The marking symbol is specified by the variable `diary-entry-marker'."
- :type 'boolean
- :group 'diary)
- ;;;###autoload
- (defcustom calendar-remove-frame-by-deleting nil
- "Determine how the calendar mode removes a frame no longer needed.
- If nil, make an icon of the frame. If non-nil, delete the frame."
- :type 'boolean
- :group 'view)
- (defvar diary-face 'diary
- "Face name to use for diary entries.")
- (defface diary
- '((((class color) (background light))
- (:foreground "red"))
- (((class color) (background dark))
- (:foreground "yellow"))
- (t
- (:bold t)))
- "Face for highlighting diary entries."
- :group 'diary)
- ;; backward-compatibility alias
- (put 'diary-face 'face-alias 'diary)
- (defface calendar-today-face
- '((t (:underline t)))
- "Face for indicating today's date."
- :group 'diary)
- ;; backward-compatibility alias
- (defface holiday-face
- '((((class color) (background light))
- (:background "pink"))
- (((class color) (background dark))
- (:background "chocolate4"))
- (t
- (:inverse-video t)))
- "Face for indicating dates that have holidays."
- :group 'diary)
- ;; backward-compatibility alias
- (defcustom diary-entry-marker
- (if (not (display-color-p))
- "+"
- 'diary)
- "How to mark dates that have diary entries.
- The value can be either a single-character string or a face."
- :type '(choice string face)
- :group 'diary)
- (defcustom calendar-today-marker
- (if (not (display-color-p))
- "="
- 'calendar-today-face)
- "How to mark today's date in the calendar.
- The value can be either a single-character string or a face.
- Marking today's date is done only if you set up `today-visible-calendar-hook'
- to request that."
- :type '(choice string face)
- :group 'calendar)
- (defcustom calendar-holiday-marker
- (if (not (display-color-p))
- "*"
- 'holiday-face)
- "How to mark notable dates in the calendar.
- The value can be either a single-character string or a face."
- :type '(choice string face)
- :group 'calendar)
- ;;;###autoload
- (defcustom view-calendar-holidays-initially nil
- "Non-nil means display holidays for current three month period on entry.
- The holidays are displayed in another window when the calendar is first
- displayed."
- :type 'boolean
- :group 'holidays)
- ;;;###autoload
- (defcustom mark-holidays-in-calendar nil
- "Non-nil means mark dates of holidays in the calendar window.
- The marking symbol is specified by the variable `calendar-holiday-marker'."
- :type 'boolean
- :group 'holidays)
- ;;;###autoload
- (defcustom all-hebrew-calendar-holidays nil
- "If nil, show only major holidays from the Hebrew calendar.
- This means only those Jewish holidays that appear on secular calendars.
- If t, show all the holidays that would appear in a complete Hebrew calendar."
- :type 'boolean
- :group 'holidays)
- ;;;###autoload
- (defcustom all-christian-calendar-holidays nil
- "If nil, show only major holidays from the Christian calendar.
- This means only those Christian holidays that appear on secular calendars.
- If t, show all the holidays that would appear in a complete Christian
- calendar."
- :type 'boolean
- :group 'holidays)
- ;;;###autoload
- (defcustom all-islamic-calendar-holidays nil
- "If nil, show only major holidays from the Islamic calendar.
- This means only those Islamic holidays that appear on secular calendars.
- If t, show all the holidays that would appear in a complete Islamic
- calendar."
- :type 'boolean
- :group 'holidays)
- (defcustom diary-file-name-prefix-function (function (lambda (str) str))
- "The function that will take a diary file name and return the desired prefix."
- :type 'function
- :group 'diary)
- ;;;###autoload
- (defcustom all-bahai-calendar-holidays nil
- "If nil, show only major holidays from the Baha'i calendar.
- These are the days on which work and school must be suspended.
- If t, show all the holidays that would appear in a complete Baha'i
- calendar."
- :type 'boolean
- :group 'holidays)
- (defcustom calendar-mode-hook nil
- "Hook run when entering `calendar-mode'."
- :type 'hook
- :group 'calendar-hooks)
- ;;;###autoload
- (defcustom calendar-load-hook nil
- "List of functions to be called after the calendar is first loaded.
- This is the place to add key bindings to `calendar-mode-map'."
- :type 'hook
- :group 'calendar-hooks)
- ;;;###autoload
- (defcustom initial-calendar-window-hook nil
- "List of functions to be called when the calendar window is first opened.
- The functions invoked are called after the calendar window is opened, but
- once opened is never called again. Leaving the calendar with the `q' command
- and reentering it will cause these functions to be called again."
- :type 'hook
- :group 'calendar-hooks)
- ;;;###autoload
- (defcustom today-visible-calendar-hook nil
- "List of functions called whenever the current date is visible.
- This can be used, for example, to replace today's date with asterisks; a
- function `calendar-star-date' is included for this purpose:
- (setq today-visible-calendar-hook 'calendar-star-date)
- It can also be used to mark the current date with `calendar-today-marker';
- a function is also provided for this:
- (setq today-visible-calendar-hook 'calendar-mark-today)
- The corresponding variable `today-invisible-calendar-hook' is the list of
- functions called when the calendar function was called when the current
- date is not visible in the window.
- Other than the use of the provided functions, the changing of any
- characters in the calendar buffer by the hooks may cause the failure of the
- functions that move by days and weeks."
- :type 'hook
- :group 'calendar-hooks)
- ;;;###autoload
- (defcustom today-invisible-calendar-hook nil
- "List of functions called whenever the current date is not visible.
- The corresponding variable `today-visible-calendar-hook' is the list of
- functions called when the calendar function was called when the current
- date is visible in the window.
- Other than the use of the provided functions, the changing of any
- characters in the calendar buffer by the hooks may cause the failure of the
- functions that move by days and weeks."
- :type 'hook
- :group 'calendar-hooks)
- ;;;###autoload
- (defcustom calendar-move-hook nil
- "List of functions called whenever the cursor moves in the calendar.
- For example,
- (add-hook 'calendar-move-hook (lambda () (diary-view-entries 1)))
- redisplays the diary for whatever date the cursor is moved to."
- :type 'hook
- :group 'calendar-hooks)
- ;;;###autoload
- (defcustom diary-file "~/diary"
- "Name of the file in which one's personal diary of dates is kept.
- The file's entries are lines beginning with any of the forms
- specified by the variable `american-date-diary-pattern', by default:
- MONTH/DAY
- MONTH/DAY/YEAR
- MONTHNAME DAY
- MONTHNAME DAY, YEAR
- DAYNAME
- with the remainder of the line being the diary entry string for
- that date. MONTH and DAY are one or two digit numbers, YEAR is a
- number and may be written in full or abbreviated to the final two
- digits (if `abbreviated-calendar-year' is non-nil). MONTHNAME
- and DAYNAME can be spelled in full (as specified by the variables
- `calendar-month-name-array' and `calendar-day-name-array'),
- abbreviated (as specified by `calendar-month-abbrev-array' and
- `calendar-day-abbrev-array') with or without a period,
- capitalized or not. Any of DAY, MONTH, or MONTHNAME, YEAR can be
- `*' which matches any day, month, or year, respectively. If the
- date does not contain a year, it is generic and applies to any
- year. A DAYNAME entry applies to the appropriate day of the week
- in every week.
- The European style (in which the day precedes the month) can be
- used instead, if you execute `european-calendar' when in the
- calendar, or set `european-calendar-style' to t in your .emacs
- file. The European forms (see `european-date-diary-pattern') are
- DAY/MONTH
- DAY/MONTH/YEAR
- DAY MONTHNAME
- DAY MONTHNAME YEAR
- DAYNAME
- To revert to the default American style from the European style, execute
- `american-calendar' in the calendar.
- A diary entry can be preceded by the character
- `diary-nonmarking-symbol' (ordinarily `&') to make that entry
- nonmarking--that is, it will not be marked on dates in the calendar
- window but will appear in a diary window.
- Multiline diary entries are made by indenting lines after the first with
- either a TAB or one or more spaces.
- Lines not in one the above formats are ignored. Here are some sample diary
- entries (in the default American style):
- 12/22/1988 Twentieth wedding anniversary!!
- &1/1. Happy New Year!
- 10/22 Ruth's birthday.
- 21: Payday
- Tuesday--weekly meeting with grad students at 10am
- Supowit, Shen, Bitner, and Kapoor to attend.
- 1/13/89 Friday the thirteenth!!
- &thu 4pm squash game with Lloyd.
- mar 16 Dad's birthday
- April 15, 1989 Income tax due.
- &* 15 time cards due.
- If the first line of a diary entry consists only of the date or day name with
- no trailing blanks or punctuation, then that line is not displayed in the
- diary window; only the continuation lines is shown. For example, the
- single diary entry
- 02/11/1989
- Bill Blattner visits Princeton today
- 2pm Cognitive Studies Committee meeting
- 2:30-5:30 Lizzie at Lawrenceville for `Group Initiative'
- 4:00pm Jamie Tappenden
- 7:30pm Dinner at George and Ed's for Alan Ryan
- 7:30-10:00pm dance at Stewart Country Day School
- will appear in the diary window without the date line at the beginning. This
- facility allows the diary window to look neater, but can cause confusion if
- used with more than one day's entries displayed.
- Diary entries can be based on Lisp sexps. For example, the diary entry
- %%(diary-block 11 1 1990 11 10 1990) Vacation
- causes the diary entry \"Vacation\" to appear from November 1 through
- November 10, 1990. Other functions available are `diary-float',
- `diary-anniversary', `diary-cyclic', `diary-day-of-year',
- `diary-iso-date', `diary-french-date', `diary-hebrew-date',
- `diary-islamic-date', `diary-bahai-date', `diary-mayan-date',
- `diary-chinese-date', `diary-coptic-date', `diary-ethiopic-date',
- `diary-persian-date', `diary-yahrzeit', `diary-sunrise-sunset',
- `diary-phases-of-moon', `diary-parasha', `diary-omer',
- `diary-rosh-hodesh', and `diary-sabbath-candles'. See the
- documentation for the function `list-sexp-diary-entries' for more
- details.
- Diary entries based on the Hebrew, the Islamic and/or the Baha'i
- calendar are also possible, but because these are somewhat slow, they
- are ignored unless you set the `nongregorian-diary-listing-hook' and
- the `nongregorian-diary-marking-hook' appropriately. See the
- documentation for these functions for details.
- Diary files can contain directives to include the contents of other files; for
- details, see the documentation for the variable `list-diary-entries-hook'."
- :type 'file
- :group 'diary)
- ;;;###autoload
- (defcustom diary-nonmarking-symbol "&"
- "Symbol indicating that a diary entry is not to be marked in the calendar."
- :type 'string
- :group 'diary)
- ;;;###autoload
- (defcustom hebrew-diary-entry-symbol "H"
- "Symbol indicating a diary entry according to the Hebrew calendar."
- :type 'string
- :group 'diary)
- ;;;###autoload
- (defcustom islamic-diary-entry-symbol "I"
- "Symbol indicating a diary entry according to the Islamic calendar."
- :type 'string
- :group 'diary)
- ;;;###autoload
- (defcustom bahai-diary-entry-symbol "B"
- "Symbol indicating a diary entry according to the Baha'i calendar."
- :type 'string
- :group 'diary)
- ;;;###autoload
- (defcustom diary-include-string "#include"
- "The string indicating inclusion of another file of diary entries.
- See the documentation for the function `include-other-diary-files'."
- :type 'string
- :group 'diary)
- (defcustom diary-glob-file-regexp-prefix "^\\#"
- "The regular expression that gets pre-pended to each of the attribute-regexp's for file-wide specifiers."
- :type 'regexp
- :group 'diary)
- (defcustom diary-face-attrs
- '((" *\\[foreground:\\([-a-z]+\\)\\]$" 1 :foreground string)
- (" *\\[background:\\([-a-z]+\\)\\]$" 1 :background string)
- (" *\\[width:\\([-a-z]+\\)\\]$" 1 :width symbol)
- (" *\\[height:\\([-0-9a-z]+\\)\\]$" 1 :height int)
- (" *\\[weight:\\([-a-z]+\\)\\]$" 1 :weight symbol)
- (" *\\[slant:\\([-a-z]+\\)\\]$" 1 :slant symbol)
- ;; XEmacs change, we don't support underline faces
- (" *\\[underline:\\([-a-z]+\\)\\]$" 1 :underline tnil)
- (" *\\[overline:\\([-a-z]+\\)\\]$" 1 :overline stringtnil)
- (" *\\[strike-through:\\([-a-z]+\\)\\]$" 1 :strike-through stringtnil)
- (" *\\[inverse-video:\\([-a-z]+\\)\\]$" 1 :inverse-video tnil)
- (" *\\[face:\\([-0-9a-z]+\\)\\]$" 1 :face string)
- (" *\\[font:\\([-a-z0-9]+\\)\\]$" 1 :font string)
- ;; Unsupported.
- ;;; (" *\\[box:\\([-a-z]+\\)\\]$" 1 :box)
- ;;; (" *\\[stipple:\\([-a-z]+\\)\\]$" 1 :stipple)
- )
- "A list of (regexp regnum attr attrtype) lists where the
- regexp says how to find the tag, the regnum says which
- parenthetical sub-regexp this regexp looks for, and the attr says
- which attribute of the face (or that this _is_ a face) is being
- modified."
- :type 'sexp
- :group 'diary)
- (defcustom diary-file-name-prefix nil
- "If non-nil each diary entry is prefixed with the name of the file where it is defined."
- :type 'boolean
- :group 'diary)
- ;;;###autoload
- (defcustom sexp-diary-entry-symbol "%%"
- "The string used to indicate a sexp diary entry in `diary-file'.
- See the documentation for the function `list-sexp-diary-entries'."
- :type 'string
- :group 'diary)
- ;;;###autoload
- (defcustom abbreviated-calendar-year t
- "Interpret a two-digit year DD in a diary entry as either 19DD or 20DD.
- For the Gregorian calendar; similarly for the Hebrew, Islamic and
- Baha'i calendars. If this variable is nil, years must be written in
- full."
- :type 'boolean
- :group 'diary)
- ;;;###autoload
- (defcustom european-calendar-style nil
- "Use the European style of dates in the diary and in any displays.
- If this variable is t, a date 1/2/1990 would be interpreted as February 1,
- 1990. The default European date styles (see `european-date-diary-pattern')
- are
- DAY/MONTH
- DAY/MONTH/YEAR
- DAY MONTHNAME
- DAY MONTHNAME YEAR
- DAYNAME
- Names can be capitalized or not, written in full (as specified by the
- variable `calendar-day-name-array'), or abbreviated (as specified by
- `calendar-day-abbrev-array') with or without a period.
- Setting this variable directly does not take effect (if the
- calendar package is already loaded). Rather, use either
- \\[customize] or the functions `european-calendar' and
- `american-calendar'."
- :type 'boolean
- ;; Without :initialize (require 'calendar) throws an error because
- ;; american-calendar is undefined at this point.
- :initialize 'custom-initialize-default
- :set (lambda (symbol value)
- (if value
- (european-calendar)
- (american-calendar)))
- :group 'diary)
- ;;;###autoload
- (defcustom american-date-diary-pattern
- '((month "/" day "[^/0-9]")
- (month "/" day "/" year "[^0-9]")
- (monthname " *" day "[^,0-9]")
- (monthname " *" day ", *" year "[^0-9]")
- (dayname "\\W"))
- "List of pseudo-patterns describing the American patterns of date used.
- See the documentation of `diary-date-forms' for an explanation."
- :type '(repeat (choice (cons :tag "Backup"
- :value (backup . nil)
- (const backup)
- (repeat (list :inline t :format "%v"
- (symbol :tag "Keyword")
- (choice symbol regexp))))
- (repeat (list :inline t :format "%v"
- (symbol :tag "Keyword")
- (choice symbol regexp)))))
- :group 'diary)
- ;;;###autoload
- (defcustom european-date-diary-pattern
- '((day "/" month "[^/0-9]")
- (day "/" month "/" year "[^0-9]")
- (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|\\([0-9]+[:aApP]\\)\\)")
- (day " *" monthname " *" year "[^0-9]")
- (dayname "\\W"))
- "List of pseudo-patterns describing the European patterns of date used.
- See the documentation of `diary-date-forms' for an explanation."
- :type '(repeat (choice (cons :tag "Backup"
- :value (backup . nil)
- (const backup)
- (repeat (list :inline t :format "%v"
- (symbol :tag "Keyword")
- (choice symbol regexp))))
- (repeat (list :inline t :format "%v"
- (symbol :tag "Keyword")
- (choice symbol regexp)))))
- :group 'diary)
- (defcustom diary-date-forms
- (if european-calendar-style
- european-date-diary-pattern
- american-date-diary-pattern)
- "List of pseudo-patterns describing the forms of date used in the diary.
- The patterns on the list must be MUTUALLY EXCLUSIVE and should not match
- any portion of the diary entry itself, just the date component.
- A pseudo-pattern is a list of regular expressions and the keywords `month',
- `day', `year', `monthname', and `dayname'. The keyword `monthname' will
- match the name of the month (see `calendar-month-name-array'), capitalized
- or not, or its user-specified abbreviation (see `calendar-month-abbrev-array'),
- followed by a period or not; it will also match `*'. Similarly, `dayname'
- will match the name of the day (see `calendar-day-name-array'), capitalized or
- not, or its user-specified abbreviation (see `calendar-day-abbrev-array'),
- followed by a period or not. The keywords `month', `day', and `year' will
- match those numerical values, preceded by arbitrarily many zeros; they will
- also match `*'.
- The matching of the diary entries with the date forms is done with the
- standard syntax table from Fundamental mode, but with the `*' changed so
- that it is a word constituent.
- If, to be mutually exclusive, a pseudo-pattern must match a portion of the
- diary entry itself, the first element of the pattern MUST be `backup'. This
- directive causes the date recognizer to back up to the beginning of the
- current word of the diary entry, so in no case can the pattern match more than
- a portion of the first word of the diary entry."
- :type '(repeat (choice (cons :tag "Backup"
- :value (backup . nil)
- (const backup)
- (repeat (list :inline t :format "%v"
- (symbol :tag "Keyword")
- (choice symbol regexp))))
- (repeat (list :inline t :format "%v"
- (symbol :tag "Keyword")
- (choice symbol regexp)))))
- :group 'diary)
- ;;;###autoload
- (defcustom european-calendar-display-form
- '((if dayname (concat dayname ", ")) day " " monthname " " year)
- "Pseudo-pattern governing the way a date appears in the European style.
- See the documentation of `calendar-date-display-form' for an explanation."
- :type 'sexp
- :group 'calendar)
- ;;;###autoload
- (defcustom american-calendar-display-form
- '((if dayname (concat dayname ", ")) monthname " " day ", " year)
- "Pseudo-pattern governing the way a date appears in the American style.
- See the documentation of `calendar-date-display-form' for an explanation."
- :type 'sexp
- :group 'calendar)
- (defcustom calendar-date-display-form
- (if european-calendar-style
- european-calendar-display-form
- american-calendar-display-form)
- "Pseudo-pattern governing the way a date appears.
- Used by the function `calendar-date-string', a pseudo-pattern is a list of
- expressions that can involve the keywords `month', `day', and `year', all
- numbers in string form, and `monthname' and `dayname', both alphabetic
- strings. For example, the ISO standard would use the pseudo- pattern
- '(year \"-\" month \"-\" day)
- while a typical American form would be
- '(month \"/\" day \"/\" (substring year -2))
- and
- '((format \"%9s, %9s %2s, %4s\" dayname monthname day year))
- would give the usual American style in fixed-length fields.
- See the documentation of the function `calendar-date-string'."
- :type 'sexp
- :group 'calendar)
- (defun european-calendar ()
- "Set the interpretation and display of dates to the European style."
- (interactive)
- (setq european-calendar-style t)
- (setq calendar-date-display-form european-calendar-display-form)
- (setq diary-date-forms european-date-diary-pattern)
- (update-calendar-mode-line))
- (defun american-calendar ()
- "Set the interpretation and display of dates to the American style."
- (interactive)
- (setq european-calendar-style nil)
- (setq calendar-date-display-form american-calendar-display-form)
- (setq diary-date-forms american-date-diary-pattern)
- (update-calendar-mode-line))
- ;;;###autoload
- (defcustom print-diary-entries-hook 'lpr-buffer
- "List of functions called after a temporary diary buffer is prepared.
- The buffer shows only the diary entries currently visible in the diary
- buffer. The default just does the printing. Other uses might include, for
- example, rearranging the lines into order by day and time, saving the buffer
- instead of deleting it, or changing the function used to do the printing."
- :type 'hook
- :group 'diary)
- ;;;###autoload
- (defcustom list-diary-entries-hook nil
- "List of functions called after diary file is culled for relevant entries.
- It is to be used for diary entries that are not found in the diary file.
- A function `include-other-diary-files' is provided for use as the value of
- this hook. This function enables you to use shared diary files together
- with your own. The files included are specified in the diary file by lines
- of the form
- #include \"filename\"
- This is recursive; that is, #include directives in files thus included are
- obeyed. You can change the \"#include\" to some other string by changing
- the variable `diary-include-string'. When you use `include-other-diary-files'
- as part of the list-diary-entries-hook, you will probably also want to use the
- function `mark-included-diary-files' as part of `mark-diary-entries-hook'.
- For example, you could use
- (setq list-diary-entries-hook
- '(include-other-diary-files sort-diary-entries))
- (setq diary-display-hook 'fancy-diary-display)
- in your `.emacs' file to cause the fancy diary buffer to be displayed with
- diary entries from various included files, each day's entries sorted into
- lexicographic order."
- :type 'hook
- :options '(include-other-diary-files sort-diary-entries)
- :group 'diary)
- ;;;###autoload
- (defcustom diary-hook nil
- "List of functions called after the display of the diary.
- Can be used for appointment notification."
- :type 'hook
- :group 'diary)
- (autoload 'diary-set-maybe-redraw "diary-lib")
- ;;;###autoload
- (defcustom diary-display-hook nil
- "List of functions that handle the display of the diary.
- If nil (the default), `simple-diary-display' is used. Use `ignore' for no
- diary display.
- Ordinarily, this just displays the diary buffer (with holidays indicated in
- the mode line), if there are any relevant entries. At the time these
- functions are called, the variable `diary-entries-list' is a list, in order
- by date, of all relevant diary entries in the form of ((MONTH DAY YEAR)
- STRING), where string is the diary entry for the given date. This can be
- used, for example, a different buffer for display (perhaps combined with
- holidays), or produce hard copy output.
- A function `fancy-diary-display' is provided as an alternative
- choice for this hook; this function prepares a special noneditable diary
- buffer with the relevant diary entries that has neat day-by-day arrangement
- with headings. The fancy diary buffer will show the holidays unless the
- variable `holidays-in-diary-buffer' is set to nil. Ordinarily, the fancy
- diary buffer will not show days for which there are no diary entries, even
- if that day is a holiday; if you want such days to be shown in the fancy
- diary buffer, set the variable `diary-list-include-blanks' to t."
- :type 'hook
- :options '(fancy-diary-display)
- :initialize 'custom-initialize-default
- :set 'diary-set-maybe-redraw
- :group 'diary)
- ;;;###autoload
- (defcustom nongregorian-diary-listing-hook nil
- "List of functions called for listing diary file and included files.
- As the files are processed for diary entries, these functions are used
- to cull relevant entries. You can use either or both of
- `list-hebrew-diary-entries', `list-islamic-diary-entries' and
- `list-bahai-diary-entries'. The documentation for these functions
- describes the style of such diary entries."
- :type 'hook
- :options '(list-hebrew-diary-entries
- list-islamic-diary-entries
- list-bahai-diary-entries)
- :group 'diary)
- ;;;###autoload
- (defcustom mark-diary-entries-hook nil
- "List of functions called after marking diary entries in the calendar.
- A function `mark-included-diary-files' is also provided for use as the
- `mark-diary-entries-hook'; it enables you to use shared diary files together
- with your own. The files included are specified in the diary file by lines
- of the form
- #include \"filename\"
- This is recursive; that is, #include directives in files thus included are
- obeyed. You can change the \"#include\" to some other string by changing the
- variable `diary-include-string'. When you use `mark-included-diary-files' as
- part of the mark-diary-entries-hook, you will probably also want to use the
- function `include-other-diary-files' as part of `list-diary-entries-hook'."
- :type 'hook
- :options '(mark-included-diary-files)
- :group 'diary)
- ;;;###autoload
- (defcustom nongregorian-diary-marking-hook nil
- "List of functions called for marking diary file and included files.
- As the files are processed for diary entries, these functions are used
- to cull relevant entries. You can use either or both of
- `mark-hebrew-diary-entries', `mark-islamic-diary-entries' and
- `mark-bahai-diary-entries'. The documentation for these functions
- describes the style of such diary entries."
- :type 'hook
- :options '(mark-hebrew-diary-entries
- mark-islamic-diary-entries
- mark-bahai-diary-entries)
- :group 'diary)
- ;;;###autoload
- (defcustom diary-list-include-blanks nil
- "If nil, do not include days with no diary entry in the list of diary entries.
- Such days will then not be shown in the fancy diary buffer, even if they
- are holidays."
- :type 'boolean
- :group 'diary)
- ;;;###autoload
- (defcustom holidays-in-diary-buffer t
- "Non-nil means include holidays in the diary display.
- The holidays appear in the mode line of the diary buffer, or in the
- fancy diary buffer next to the date. This slows down the diary functions
- somewhat; setting it to nil makes the diary display faster."
- :type 'boolean
- :group 'holidays)
- (defvar calendar-mark-ring nil)
- ;;;###autoload
- (put 'general-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom general-holidays
- '((holiday-fixed 1 1 "New Year's Day")
- (holiday-float 1 1 3 "Martin Luther King Day")
- (holiday-fixed 2 2 "Groundhog Day")
- (holiday-fixed 2 14 "Valentine's Day")
- (holiday-float 2 1 3 "President's Day")
- (holiday-fixed 3 17 "St. Patrick's Day")
- (holiday-fixed 4 1 "April Fools' Day")
- (holiday-float 5 0 2 "Mother's Day")
- (holiday-float 5 1 -1 "Memorial Day")
- (holiday-fixed 6 14 "Flag Day")
- (holiday-float 6 0 3 "Father's Day")
- (holiday-fixed 7 4 "Independence Day")
- (holiday-float 9 1 1 "Labor Day")
- (holiday-float 10 1 2 "Columbus Day")
- (holiday-fixed 10 31 "Halloween")
- (holiday-fixed 11 11 "Veteran's Day")
- (holiday-float 11 4 4 "Thanksgiving"))
- "General holidays. Default value is for the United States.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
- ;;;###autoload
- (put 'oriental-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom oriental-holidays
- '((if (fboundp 'atan)
- (holiday-chinese-new-year)))
- "Oriental holidays.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
- ;;;###autoload
- (put 'local-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom local-holidays nil
- "Local holidays.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'local
- :group 'holidays)
- ;;;###autoload
- (put 'other-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom other-holidays nil
- "User defined holidays.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
- ;;;###autoload
- (put 'hebrew-holidays-1 'risky-local-variable t)
- ;;;###autoload
- (defvar hebrew-holidays-1
- '((holiday-rosh-hashanah-etc)
- (if all-hebrew-calendar-holidays
- (holiday-julian
- 11
- (let* ((m displayed-month)
- (y displayed-year)
- (year))
- (increment-calendar-month m y -1)
- (let ((year (extract-calendar-year
- (calendar-julian-from-absolute
- (calendar-absolute-from-gregorian
- (list m 1 y))))))
- (if (zerop (% (1+ year) 4))
- 22
- 21))) "\"Tal Umatar\" (evening)"))))
- ;;;###autoload
- (put 'hebrew-holidays-2 'risky-local-variable t)
- ;;;###autoload
- (defvar hebrew-holidays-2
- '((if all-hebrew-calendar-holidays
- (holiday-hanukkah)
- (holiday-hebrew 9 25 "Hanukkah"))
- (if all-hebrew-calendar-holidays
- (holiday-hebrew
- 10
- (let ((h-year (extract-calendar-year
- (calendar-hebrew-from-absolute
- (calendar-absolute-from-gregorian
- (list displayed-month 28 displayed-year))))))
- (if (= (% (calendar-absolute-from-hebrew (list 10 10 h-year))
- 7)
- 6)
- 11 10))
- "Tzom Teveth"))
- (if all-hebrew-calendar-holidays
- (holiday-hebrew 11 15 "Tu B'Shevat"))))
- ;;;###autoload
- (put 'hebrew-holidays-3 'risky-local-variable t)
- ;;;###autoload
- (defvar hebrew-holidays-3
- '((if all-hebrew-calendar-holidays
- (holiday-hebrew
- 11
- (let ((m displayed-month)
- (y displayed-year))
- (increment-calendar-month m y 1)
- (let* ((h-year (extract-calendar-year
- (calendar-hebrew-from-absolute
- (calendar-absolute-from-gregorian
- (list m
- (calendar-last-day-of-month m y)
- y)))))
- (s-s
- (calendar-hebrew-from-absolute
- (if (=
- (% (calendar-absolute-from-hebrew
- (list 7 1 h-year))
- 7)
- 6)
- (calendar-dayname-on-or-before
- 6 (calendar-absolute-from-hebrew
- (list 11 17 h-year)))
- (calendar-dayname-on-or-before
- 6 (calendar-absolute-from-hebrew
- (list 11 16 h-year))))))
- (day (extract-calendar-day s-s)))
- day))
- "Shabbat Shirah"))))
- ;;;###autoload
- (put 'hebrew-holidays-4 'risky-local-variable t)
- ;;;###autoload
- (defvar hebrew-holidays-4
- '((holiday-passover-etc)
- (if (and all-hebrew-calendar-holidays
- (let* ((m displayed-month)
- (y displayed-year)
- (year))
- (increment-calendar-month m y -1)
- (let ((year (extract-calendar-year
- (calendar-julian-from-absolute
- (calendar-absolute-from-gregorian
- (list m 1 y))))))
- (= 21 (% year 28)))))
- (holiday-julian 3 26 "Kiddush HaHamah"))
- (if all-hebrew-calendar-holidays
- (holiday-tisha-b-av-etc))))
- ;;;###autoload
- (put 'hebrew-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2
- hebrew-holidays-3 hebrew-holidays-4)
- "Jewish holidays.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
- ;;;###autoload
- (put 'christian-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom christian-holidays
- '((if all-christian-calendar-holidays
- (holiday-fixed 1 6 "Epiphany"))
- (holiday-easter-etc 0 "Easter Sunday")
- (holiday-easter-etc -2 "Good Friday")
- (holiday-easter-etc -46 "Ash Wednesday")
- (if all-christian-calendar-holidays
- (holiday-easter-etc -63 "Septuagesima Sunday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc -56 "Sexagesima Sunday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc -49 "Shrove Sunday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc -48 "Shrove Monday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc -47 "Shrove Tuesday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc -14 "Passion Sunday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc -7 "Palm Sunday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc -3 "Maundy Thursday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc 35 "Rogation Sunday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc 39 "Ascension Day"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc 49 "Pentecost (Whitsunday)"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc 50 "Whitmonday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc 56 "Trinity Sunday"))
- (if all-christian-calendar-holidays
- (holiday-easter-etc 60 "Corpus Christi"))
- (if all-christian-calendar-holidays
- (holiday-greek-orthodox-easter))
- (if all-christian-calendar-holidays
- (holiday-fixed 8 15 "Assumption"))
- (if all-christian-calendar-holidays
- (holiday-advent 0 "Advent"))
- (holiday-fixed 12 25 "Christmas")
- (if all-christian-calendar-holidays
- (holiday-julian 12 25 "Eastern Orthodox Christmas")))
- "Christian holidays.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
- ;;;###autoload
- (put 'islamic-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom islamic-holidays
- '((holiday-islamic
- 1 1
- (format "Islamic New Year %d"
- (let ((m displayed-month)
- (y displayed-year))
- (increment-calendar-month m y 1)
- (extract-calendar-year
- (calendar-islamic-from-absolute
- (calendar-absolute-from-gregorian
- (list
- m (calendar-last-day-of-month m y) y)))))))
- (if all-islamic-calendar-holidays
- (holiday-islamic 1 10 "Ashura"))
- (if all-islamic-calendar-holidays
- (holiday-islamic 3 12 "Mulad-al-Nabi"))
- (if all-islamic-calendar-holidays
- (holiday-islamic 7 26 "Shab-e-Mi'raj"))
- (if all-islamic-calendar-holidays
- (holiday-islamic 8 15 "Shab-e-Bara't"))
- (holiday-islamic 9 1 "Ramadan Begins")
- (if all-islamic-calendar-holidays
- (holiday-islamic 9 27 "Shab-e Qadr"))
- (if all-islamic-calendar-holidays
- (holiday-islamic 10 1 "Id-al-Fitr"))
- (if all-islamic-calendar-holidays
- (holiday-islamic 12 10 "Id-al-Adha")))
- "Islamic holidays.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
- ;;;###autoload
- (put 'bahai-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom bahai-holidays
- '((holiday-fixed
- 3 21
- (format "Baha'i New Year (Naw-Ruz) %d" (- displayed-year (1- 1844))))
- (holiday-fixed 4 21 "First Day of Ridvan")
- (if all-bahai-calendar-holidays
- (holiday-fixed 4 22 "Second Day of Ridvan"))
- (if all-bahai-calendar-holidays
- (holiday-fixed 4 23 "Third Day of Ridvan"))
- (if all-bahai-calendar-holidays
- (holiday-fixed 4 24 "Fourth Day of Ridvan"))
- (if all-bahai-calendar-holidays
- (holiday-fixed 4 25 "Fifth Day of Ridvan"))
- (if all-bahai-calendar-holidays
- (holiday-fixed 4 26 "Sixth Day of Ridvan"))
- (if all-bahai-calendar-holidays
- (holiday-fixed 4 27 "Seventh Day of Ridvan"))
- (if all-bahai-calendar-holidays
- (holiday-fixed 4 28 "Eighth Day of Ridvan"))
- (holiday-fixed 4 29 "Ninth Day of Ridvan")
- (if all-bahai-calendar-holidays
- (holiday-fixed 4 30 "Tenth Day of Ridvan"))
- (if all-bahai-calendar-holidays
- (holiday-fixed 5 1 "Eleventh Day of Ridvan"))
- (holiday-fixed 5 2 "Twelfth Day of Ridvan")
- (holiday-fixed 5 23 "Declaration of the Bab")
- (holiday-fixed 5 29 "Ascension of Baha'u'llah")
- (holiday-fixed 7 9 "Martyrdom of the Bab")
- (holiday-fixed 10 20 "Birth of the Bab")
- (holiday-fixed 11 12 "Birth of Baha'u'llah")
- (if all-bahai-calendar-holidays
- (holiday-fixed 11 26 "Day of the Covenant"))
- (if all-bahai-calendar-holidays
- (holiday-fixed 11 28 "Ascension of `Abdu'l-Baha")))
- "Baha'i holidays.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
- ;;;###autoload
- (put 'solar-holidays 'risky-local-variable t)
- ;;;###autoload
- (defcustom solar-holidays
- '((if (fboundp 'atan)
- (solar-equinoxes-solstices))
- (if (progn
- (require 'cal-dst)
- t)
- (funcall
- 'holiday-sexp
- calendar-daylight-savings-starts
- '(format "Daylight Saving Time Begins %s"
- (if (fboundp 'atan)
- (solar-time-string
- (/ calendar-daylight-savings-starts-time (float 60))
- calendar-standard-time-zone-name)
- ""))))
- (funcall
- 'holiday-sexp
- calendar-daylight-savings-ends
- '(format "Daylight Saving Time Ends %s"
- (if (fboundp 'atan)
- (solar-time-string
- (/ calendar-daylight-savings-ends-time (float 60))
- calendar-daylight-time-zone-name)
- ""))))
- "Sun-related holidays.
- See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
- ;;;###autoload
- (put 'calendar-holidays 'risky-local-variable t)
- (defcustom calendar-holidays
- (append general-holidays local-holidays other-holidays
- christian-holidays hebrew-holidays islamic-holidays
- bahai-holidays oriental-holidays solar-holidays)
- "List of notable days for the command \\[holidays].
- Additional holidays are easy to add to the list, just put them in the
- list `other-holidays' in your .emacs file. Similarly, by setting any
- of `general-holidays', `local-holidays' `christian-holidays',
- `hebrew-holidays', `islamic-holidays', `bahai-holidays',
- `oriental-holidays', or `solar-holidays' to nil in your .emacs file,
- you can eliminate unwanted categories of holidays.
- The aforementioned variables control the holiday choices offered
- by the function `list-holidays' when it is called interactively.
- They also initialize the default value of `calendar-holidays',
- which is the default list of holidays used by the function
- `list-holidays' in the non-interactive case. Note that these
- variables have no effect on `calendar-holidays' after it has been
- set (e.g. after the calendar is loaded). In that case, customize
- `calendar-holidays' directly.
- The intention is that (in the US) `local-holidays' be set in
- site-init.el and `other-holidays' be set by the user.
- Entries on the list are expressions that return (possibly empty) lists of
- items of the form ((month day year) string) of a holiday in the in the
- three-month period centered around `displayed-month' of `displayed-year'.
- Several basic functions are provided for this purpose:
- (holiday-fixed MONTH DAY STRING) is a fixed date on the Gregorian calendar
- (holiday-float MONTH DAYNAME K STRING &optional day) is the Kth DAYNAME in
- MONTH on the Gregorian calendar (0 for Sunday,
- etc.); K<0 means count back from the end of the
- month. An optional parameter DAY means the Kth
- DAYNAME after/before MONTH DAY.
- (holiday-hebrew MONTH DAY STRING) a fixed date on the Hebrew calendar
- (holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar
- (holiday-bahai MONTH DAY STRING) a fixed date on the Baha'i calendar
- (holiday-julian MONTH DAY STRING) a fixed date on the Julian calendar
- (holiday-sexp SEXP STRING) SEXP is a Gregorian-date-valued expression
- in the variable `year'; if it evaluates to
- a visible date, that's the holiday; if it
- evaluates to nil, there's no holiday. STRING
- is an expression in the variable `date'.
- For example, to add Bastille Day, celebrated in France on July 14, add
- (holiday-fixed 7 14 \"Bastille Day\")
- to the list. To add Hurricane Supplication Day, celebrated in the Virgin
- Islands on the fourth Monday in August, add
- (holiday-float 8 1 4 \"Hurricane Supplication Day\")
- to the list (the last Monday would be specified with `-1' instead of `4').
- To add the last day of Hanukkah to the list, use
- (holiday-hebrew 10 2 \"Last day of Hanukkah\")
- since the Hebrew months are numbered with 1 starting from Nisan, while to
- add the Islamic feast celebrating Mohammed's birthday use
- (holiday-islamic 3 12 \"Mohammed's Birthday\")
- since the Islamic months are numbered from 1 starting with Muharram. To
- add an entry for the Baha'i festival of Ridvan, use
- (holiday-bahai 2 13 \"Festival of Ridvan\")
- since the Baha'i months are numbered from 1 starting with Baha. To
- add Thomas Jefferson's birthday, April 2, 1743 (Julian), use
- (holiday-julian 4 2 \"Jefferson's Birthday\")
- To include a holiday conditionally, use the sexp form or a conditional. For
- example, to include American presidential elections, which occur on the first
- Tuesday after the first Monday in November of years divisible by 4, add
- (holiday-sexp
- '(if (zerop (% 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\")
- or
- (if (zerop (% displayed-year 4))
- (holiday-fixed 11
- (extract-calendar-day
- (calendar-gregorian-from-absolute
- (1+ (calendar-dayname-on-or-before
- 1 (+ 6 (calendar-absolute-from-gregorian
- (list 11 1 displayed-year)))))))
- \"US Presidential Election\"))
- to the list. To include the phases of the moon, add
- (lunar-phases)
- to the holiday list, where `lunar-phases' is an Emacs-Lisp function that
- you've written to return a (possibly empty) list of the relevant VISIBLE dates
- with descriptive strings such as
- (((2 6 1989) \"New Moo…
Large files files are truncated, but you can click here to view the full file