2018-12-01 14:43:37 +00:00
|
|
|
|
;;; holidays.el --- holiday functions for the calendar package -*- lexical-binding:t -*-
|
1992-07-16 07:28:05 +00:00
|
|
|
|
|
2022-01-01 07:45:51 +00:00
|
|
|
|
;; Copyright (C) 1989-1990, 1992-1994, 1997, 2001-2022 Free Software
|
2015-01-01 22:26:41 +00:00
|
|
|
|
;; Foundation, Inc.
|
1992-07-22 04:22:42 +00:00
|
|
|
|
|
1992-07-16 07:28:05 +00:00
|
|
|
|
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
|
2019-06-01 19:11:55 +00:00
|
|
|
|
;; Maintainer: emacs-devel@gnu.org
|
1992-08-12 12:50:10 +00:00
|
|
|
|
;; Keywords: holidays, calendar
|
2010-08-29 16:17:13 +00:00
|
|
|
|
;; Package: calendar
|
1992-07-16 07:28:05 +00:00
|
|
|
|
|
1991-08-23 03:01:50 +00:00
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 03:07:58 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1994-04-07 20:30:18 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 03:07:58 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
* holidays.el (calendar-holiday-function-fixed,
calendar-holiday-function-float, calendar-holiday-function-julian,
calendar-holiday-function-islamic,
calendar-holiday-function-hebrew, calendar-holiday-function-sexp,
calendar-holiday-function-advent,
calendar-holiday-function-easter-etc,
calendar-holiday-function-greek-orthodox-easter,
calendar-holiday-function-rosh-hashanah-etc,
calendar-holiday-function-hanukkah,
calendar-holiday-function-passover-etc,
calendar-holiday-function-tisha-b-av-etc): Renamed without words
"calendar" and "function"; changed argument from a list of values to
individual values. Fixed doc strings.
(calendar-holiday-function-if): Removed.
(calendar-holiday-solar-equinoxes-solstices): Renamed
solar-equinoxes-solstices.
(calendar-holiday-list): Rewrote to accomodate the name changes
above and the unquoting of calendar-holidays.
(calendar-cursor-holidays): Change screen-width to frame-width.
(holiday-sexp): Rewritten.
1993-06-22 03:24:23 +00:00
|
|
|
|
|
1991-08-23 03:01:50 +00:00
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
1994-04-07 20:30:18 +00:00
|
|
|
|
;; 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
|
2017-09-13 22:52:52 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
1991-08-23 03:01:50 +00:00
|
|
|
|
|
1992-07-16 07:28:05 +00:00
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
2008-04-01 02:47:40 +00:00
|
|
|
|
;; See calendar.el.
|
1991-08-23 03:01:50 +00:00
|
|
|
|
|
1992-07-16 07:28:05 +00:00
|
|
|
|
;;; Code:
|
|
|
|
|
|
1991-08-23 03:01:50 +00:00
|
|
|
|
(require 'calendar)
|
Speed up generation of loaddefs files
* doc/lispref/loading.texi (Autoload, Autoload by Prefix): Refer
to loaddefs-generate instead of update-file-autoloads.
* lisp/Makefile.in (LOADDEFS): Remove, because all the loaddefs
files are created in one go now.
(COMPILE_FIRST): Add loaddefs-gen/radix-tree, and drop autoload.
($(lisp)/loaddefs.el): Use loaddefs-gen.
(MH_E_DIR, $(TRAMP_DIR)/tramp-loaddefs.el)
($(MH_E_DIR)/mh-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el)
($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el): Remove.
* lisp/generic-x.el: Inhibit computing prefixes, because the
namespace here is all wonky.
* lisp/w32-fns.el (w32-batch-update-autoloads): Removed -- unused
function.
* lisp/calendar/holidays.el ("holiday-loaddefs"): Renamed from
hol-loaddefs to have a more regular name.
* lisp/cedet/ede/proj-elisp.el (ede-emacs-cedet-autogen-compiler):
Refer to loaddefs-gen instead of autoload.
* lisp/emacs-lisp/autoload.el (make-autoload, autoload-rubric)
(autoload-insert-section-header): Made into aliases of
loaddefs-gen functions.
(autoload--make-defs-autoload): Ditto.
(autoload-ignored-definitions, autoload-compute-prefixes): Moved
to loaddefs-gen.
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-autoload-regexp): New
constant.
(lisp-fdefs, lisp-mode-variables, lisp-outline-level): Use it to
recognize all ;;;###autoload forms.
* lisp/emacs-lisp/loaddefs-gen.el: New file.
* lisp/emacs-lisp/package.el: Use loaddefs-generate instead of
make-directory-autoloads.
* test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads):
Use loaddefs instead of autoloads.
2022-05-31 16:08:33 +00:00
|
|
|
|
(load "holiday-loaddefs" nil t)
|
1992-08-12 12:50:10 +00:00
|
|
|
|
|
2008-04-11 03:49:39 +00:00
|
|
|
|
(defgroup holidays nil
|
|
|
|
|
"Holidays support in calendar."
|
|
|
|
|
:group 'calendar
|
|
|
|
|
:prefix "holidays-"
|
|
|
|
|
:group 'local)
|
|
|
|
|
|
|
|
|
|
;; The various holiday variables are autoloaded because people
|
|
|
|
|
;; are used to using them to set calendar-holidays without having to
|
|
|
|
|
;; explicitly load this file.
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-general-holidays
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(mapcar 'purecopy
|
2008-04-11 03:49:39 +00:00
|
|
|
|
'((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")
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(holiday-float 11 4 4 "Thanksgiving")))
|
2008-04-11 03:49:39 +00:00
|
|
|
|
"General holidays. Default value is for the United States.
|
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-general-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-oriental-holidays
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(mapcar 'purecopy
|
2008-04-23 03:00:29 +00:00
|
|
|
|
'((holiday-chinese-new-year)
|
|
|
|
|
(if calendar-chinese-all-holidays-flag
|
|
|
|
|
(append
|
|
|
|
|
(holiday-chinese 1 15 "Lantern Festival")
|
|
|
|
|
(holiday-chinese-qingming)
|
|
|
|
|
(holiday-chinese 5 5 "Dragon Boat Festival")
|
|
|
|
|
(holiday-chinese 7 7 "Double Seventh Festival")
|
|
|
|
|
(holiday-chinese 8 15 "Mid-Autumn Festival")
|
|
|
|
|
(holiday-chinese 9 9 "Double Ninth Festival")
|
|
|
|
|
(holiday-chinese-winter-solstice)
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
))))
|
2008-04-11 03:49:39 +00:00
|
|
|
|
"Oriental holidays.
|
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
2008-04-23 03:00:29 +00:00
|
|
|
|
:version "23.1" ; added more holidays
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-oriental-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-local-holidays nil
|
|
|
|
|
"Local holidays.
|
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-local-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-other-holidays nil
|
|
|
|
|
"User defined holidays.
|
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-other-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-hebrew-holidays
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(mapcar 'purecopy
|
2008-04-11 03:49:39 +00:00
|
|
|
|
'((holiday-hebrew-passover)
|
|
|
|
|
(holiday-hebrew-rosh-hashanah)
|
|
|
|
|
(holiday-hebrew-hanukkah)
|
|
|
|
|
(if calendar-hebrew-all-holidays-flag
|
|
|
|
|
(append
|
|
|
|
|
(holiday-hebrew-tisha-b-av)
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(holiday-hebrew-misc)))))
|
2008-04-11 03:49:39 +00:00
|
|
|
|
"Jewish holidays.
|
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
|
|
|
|
:type 'sexp
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:version "23.1") ; removed dependency on hebrew-holidays-N
|
|
|
|
|
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-hebrew-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-christian-holidays
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(mapcar 'purecopy
|
2008-04-11 03:49:39 +00:00
|
|
|
|
'((holiday-easter-etc) ; respects calendar-christian-all-holidays-flag
|
|
|
|
|
(holiday-fixed 12 25 "Christmas")
|
|
|
|
|
(if calendar-christian-all-holidays-flag
|
|
|
|
|
(append
|
|
|
|
|
(holiday-fixed 1 6 "Epiphany")
|
2012-08-30 01:18:41 +00:00
|
|
|
|
(holiday-julian 12 25 "Christmas (Julian calendar)")
|
2008-04-11 03:49:39 +00:00
|
|
|
|
(holiday-greek-orthodox-easter)
|
|
|
|
|
(holiday-fixed 8 15 "Assumption")
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(holiday-advent 0 "Advent")))))
|
2008-04-11 03:49:39 +00:00
|
|
|
|
"Christian holidays.
|
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-christian-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-islamic-holidays
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(mapcar 'purecopy
|
2008-04-11 03:49:39 +00:00
|
|
|
|
'((holiday-islamic-new-year)
|
|
|
|
|
(holiday-islamic 9 1 "Ramadan Begins")
|
|
|
|
|
(if calendar-islamic-all-holidays-flag
|
|
|
|
|
(append
|
|
|
|
|
(holiday-islamic 1 10 "Ashura")
|
|
|
|
|
(holiday-islamic 3 12 "Mulad-al-Nabi")
|
|
|
|
|
(holiday-islamic 7 26 "Shab-e-Mi'raj")
|
|
|
|
|
(holiday-islamic 8 15 "Shab-e-Bara't")
|
|
|
|
|
(holiday-islamic 9 27 "Shab-e Qadr")
|
|
|
|
|
(holiday-islamic 10 1 "Id-al-Fitr")
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(holiday-islamic 12 10 "Id-al-Adha")))))
|
2008-04-11 03:49:39 +00:00
|
|
|
|
"Islamic holidays.
|
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-islamic-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-bahai-holidays
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(mapcar 'purecopy
|
2008-04-11 03:49:39 +00:00
|
|
|
|
'((holiday-bahai-new-year)
|
|
|
|
|
(holiday-bahai-ridvan) ; respects calendar-bahai-all-holidays-flag
|
2012-02-18 03:08:15 +00:00
|
|
|
|
(holiday-fixed 5 23 "Declaration of the Báb")
|
2015-09-03 22:31:12 +00:00
|
|
|
|
(holiday-fixed 5 29 "Ascension of Bahá’u’lláh")
|
2012-02-18 03:08:15 +00:00
|
|
|
|
(holiday-fixed 7 9 "Martyrdom of the Báb")
|
|
|
|
|
(holiday-fixed 10 20 "Birth of the Báb")
|
2015-09-03 22:31:12 +00:00
|
|
|
|
(holiday-fixed 11 12 "Birth of Bahá’u’lláh")
|
2008-04-11 03:49:39 +00:00
|
|
|
|
(if calendar-bahai-all-holidays-flag
|
|
|
|
|
(append
|
|
|
|
|
(holiday-fixed 11 26 "Day of the Covenant")
|
2015-09-03 22:31:12 +00:00
|
|
|
|
(holiday-fixed 11 28 "Ascension of `Abdu’l-Bahá")))))
|
|
|
|
|
"Bahá’í holidays.
|
2008-04-11 03:49:39 +00:00
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-bahai-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom holiday-solar-holidays
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(mapcar 'purecopy
|
2008-04-11 03:49:39 +00:00
|
|
|
|
'((solar-equinoxes-solstices)
|
|
|
|
|
(holiday-sexp calendar-daylight-savings-starts
|
|
|
|
|
(format "Daylight Saving Time Begins %s"
|
|
|
|
|
(solar-time-string
|
|
|
|
|
(/ calendar-daylight-savings-starts-time (float 60))
|
|
|
|
|
calendar-standard-time-zone-name)))
|
|
|
|
|
(holiday-sexp calendar-daylight-savings-ends
|
|
|
|
|
(format "Daylight Saving Time Ends %s"
|
|
|
|
|
(solar-time-string
|
|
|
|
|
(/ calendar-daylight-savings-ends-time (float 60))
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
calendar-daylight-time-zone-name)))))
|
2008-04-11 03:49:39 +00:00
|
|
|
|
"Sun-related holidays.
|
|
|
|
|
See the documentation for `calendar-holidays' for details."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'holiday-solar-holidays 'risky-local-variable t)
|
|
|
|
|
|
2009-04-02 06:34:21 +00:00
|
|
|
|
;; This one should not be autoloaded, else .emacs changes of
|
|
|
|
|
;; holiday-general-holidays etc have no effect.
|
|
|
|
|
;; FIXME should have some :set-after.
|
2008-04-11 03:49:39 +00:00
|
|
|
|
(defcustom calendar-holidays
|
|
|
|
|
(append holiday-general-holidays holiday-local-holidays
|
|
|
|
|
holiday-other-holidays holiday-christian-holidays
|
|
|
|
|
holiday-hebrew-holidays holiday-islamic-holidays
|
|
|
|
|
holiday-bahai-holidays holiday-oriental-holidays
|
|
|
|
|
holiday-solar-holidays)
|
|
|
|
|
"List of notable days for the command \\[holidays].
|
|
|
|
|
|
|
|
|
|
Additional holidays are easy to add to the list, just put them in the
|
2012-09-17 05:41:04 +00:00
|
|
|
|
list `holiday-other-holidays' in your init file. Similarly, by setting
|
2008-04-11 03:49:39 +00:00
|
|
|
|
any of `holiday-general-holidays', `holiday-local-holidays',
|
|
|
|
|
`holiday-christian-holidays', `holiday-hebrew-holidays',
|
|
|
|
|
`holiday-islamic-holidays', `holiday-bahai-holidays',
|
|
|
|
|
`holiday-oriental-holidays', or `holiday-solar-holidays' to nil in your
|
2012-09-17 05:41:04 +00:00
|
|
|
|
init file, you can eliminate unwanted categories of holidays.
|
2008-04-11 03:49:39 +00:00
|
|
|
|
|
|
|
|
|
The aforementioned variables control the holiday choices offered
|
|
|
|
|
by the function `holiday-list' 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
|
|
|
|
|
`holiday-list' 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) `holiday-local-holidays' be set in
|
|
|
|
|
site-init.el and `holiday-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
|
|
|
|
|
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
|
2008-08-26 05:39:53 +00:00
|
|
|
|
(holiday-float MONTH DAYNAME K STRING &optional DAY) is the Kth DAYNAME
|
|
|
|
|
(0 for Sunday, etc.) after/before Gregorian
|
|
|
|
|
MONTH DAY. K<0 means count back from the end
|
|
|
|
|
of the month. Optional DAY defaults to 1 if
|
|
|
|
|
K>0, and MONTH's last day otherwise.
|
2008-04-11 03:49:39 +00:00
|
|
|
|
(holiday-hebrew MONTH DAY STRING) a fixed date on the Hebrew calendar
|
|
|
|
|
(holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar
|
2015-09-03 22:31:12 +00:00
|
|
|
|
(holiday-bahai MONTH DAY STRING) a fixed date on the Bahá’í calendar
|
2008-04-11 03:49:39 +00:00
|
|
|
|
(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
|
2015-08-25 05:13:31 +00:00
|
|
|
|
Islands on the fourth Monday in July, add
|
2008-04-11 03:49:39 +00:00
|
|
|
|
|
2015-08-25 05:13:31 +00:00
|
|
|
|
(holiday-float 7 1 4 \"Hurricane Supplication Day\")
|
2008-04-11 03:49:39 +00:00
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
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.
|
2015-09-03 22:31:12 +00:00
|
|
|
|
To add an entry for the Bahá’í festival of Ridvan, use
|
2008-04-11 03:49:39 +00:00
|
|
|
|
|
|
|
|
|
(holiday-bahai 2 13 \"Festival of Ridvan\")
|
|
|
|
|
|
2015-09-03 22:31:12 +00:00
|
|
|
|
since the Bahá’í months are numbered from 1 starting with Bahá.
|
2008-04-11 03:49:39 +00:00
|
|
|
|
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
|
2015-09-03 22:31:12 +00:00
|
|
|
|
\\='(if (zerop (% year 4))
|
2008-04-11 03:49:39 +00:00
|
|
|
|
(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
|
|
|
|
|
(calendar-extract-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)
|
|
|
|
|
|
2020-09-01 21:59:11 +00:00
|
|
|
|
to the holiday list, where `lunar-phases' is an Emacs Lisp function that
|
2008-04-11 03:49:39 +00:00
|
|
|
|
you've written to return a (possibly empty) list of the relevant VISIBLE dates
|
|
|
|
|
with descriptive strings such as
|
|
|
|
|
|
|
|
|
|
(((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... )."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
:type 'sexp)
|
2008-04-11 03:49:39 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'calendar-holidays 'risky-local-variable t)
|
|
|
|
|
|
|
|
|
|
;;; End of user options.
|
|
|
|
|
|
|
|
|
|
|
2008-04-08 07:08:24 +00:00
|
|
|
|
;; FIXME name that makes sense
|
2008-03-14 07:05:10 +00:00
|
|
|
|
;;;###diary-autoload
|
|
|
|
|
(defun calendar-holiday-list ()
|
|
|
|
|
"Form the list of holidays that occur on dates in the calendar window.
|
|
|
|
|
The holidays are those in the list `calendar-holidays'."
|
2018-12-01 14:43:37 +00:00
|
|
|
|
(let (res h)
|
2008-04-03 04:10:43 +00:00
|
|
|
|
(sort
|
|
|
|
|
(dolist (p calendar-holidays res)
|
|
|
|
|
(if (setq h (if calendar-debug-sexp
|
2011-04-17 02:11:49 +00:00
|
|
|
|
(let ((debug-on-error t))
|
2018-12-01 14:43:37 +00:00
|
|
|
|
(eval p t))
|
2012-08-20 18:13:03 +00:00
|
|
|
|
(condition-case err
|
2018-12-01 14:43:37 +00:00
|
|
|
|
(eval p t)
|
2012-08-20 18:13:03 +00:00
|
|
|
|
(error
|
|
|
|
|
(display-warning
|
2015-12-08 07:28:18 +00:00
|
|
|
|
'holidays
|
2012-08-20 18:13:03 +00:00
|
|
|
|
(format "Bad holiday list item: %s\nError: %s\n"
|
2015-12-08 07:28:18 +00:00
|
|
|
|
p err)
|
|
|
|
|
:error)
|
2012-08-20 18:13:03 +00:00
|
|
|
|
nil))))
|
2008-04-03 04:10:43 +00:00
|
|
|
|
(setq res (append h res))))
|
|
|
|
|
'calendar-date-compare)))
|
2008-03-14 07:05:10 +00:00
|
|
|
|
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(defvar displayed-month) ; from calendar-generate
|
2008-03-15 02:55:45 +00:00
|
|
|
|
(defvar displayed-year)
|
|
|
|
|
|
2008-04-08 07:08:24 +00:00
|
|
|
|
;; FIXME name that makes sense
|
2008-03-14 07:05:10 +00:00
|
|
|
|
;;;###cal-autoload
|
2009-01-10 22:00:14 +00:00
|
|
|
|
(defun calendar-list-holidays (&optional event)
|
2008-03-14 07:05:10 +00:00
|
|
|
|
"Create a buffer containing the holidays for the current calendar window.
|
2008-04-01 02:47:40 +00:00
|
|
|
|
The holidays are those in the list `calendar-notable-days'.
|
2009-01-10 22:00:14 +00:00
|
|
|
|
Returns non-nil if any holidays are found.
|
|
|
|
|
If EVENT is non-nil, it's an event indicating the buffer position to
|
|
|
|
|
use instead of point."
|
|
|
|
|
(interactive (list last-nonmenu-event))
|
|
|
|
|
;; If called from a menu, with the calendar window not selected.
|
|
|
|
|
(with-current-buffer
|
|
|
|
|
(if event (window-buffer (posn-window (event-start event)))
|
|
|
|
|
(current-buffer))
|
|
|
|
|
(message "Looking up holidays...")
|
|
|
|
|
(let ((holiday-list (calendar-holiday-list))
|
|
|
|
|
(m1 displayed-month)
|
|
|
|
|
(y1 displayed-year)
|
|
|
|
|
(m2 displayed-month)
|
|
|
|
|
(y2 displayed-year))
|
|
|
|
|
(if (not holiday-list)
|
|
|
|
|
(message "Looking up holidays...none found")
|
|
|
|
|
(calendar-in-read-only-buffer holiday-buffer
|
|
|
|
|
(calendar-increment-month m1 y1 -1)
|
|
|
|
|
(calendar-increment-month m2 y2 1)
|
|
|
|
|
(calendar-set-mode-line
|
|
|
|
|
(if (= y1 y2)
|
|
|
|
|
(format "Notable Dates from %s to %s, %d%%-"
|
|
|
|
|
(calendar-month-name m1) (calendar-month-name m2) y2)
|
|
|
|
|
(format "Notable Dates from %s, %d to %s, %d%%-"
|
|
|
|
|
(calendar-month-name m1) y1 (calendar-month-name m2) y2)))
|
|
|
|
|
(insert
|
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (x) (concat (calendar-date-string (car x))
|
|
|
|
|
": " (cadr x)))
|
|
|
|
|
holiday-list "\n")))
|
|
|
|
|
(message "Looking up holidays...done"))
|
|
|
|
|
holiday-list)))
|
2008-03-14 07:05:10 +00:00
|
|
|
|
|
2001-05-09 15:13:33 +00:00
|
|
|
|
;;;###autoload
|
1992-08-12 12:50:10 +00:00
|
|
|
|
(defun holidays (&optional arg)
|
1991-08-23 03:01:50 +00:00
|
|
|
|
"Display the holidays for last month, this month, and next month.
|
2008-03-08 21:09:29 +00:00
|
|
|
|
If called with an optional prefix argument ARG, prompts for month and year.
|
2018-02-16 20:16:15 +00:00
|
|
|
|
This function is suitable for execution in an init file."
|
1992-08-12 12:50:10 +00:00
|
|
|
|
(interactive "P")
|
1991-08-23 03:01:50 +00:00
|
|
|
|
(save-excursion
|
1992-08-12 12:50:10 +00:00
|
|
|
|
(let* ((completion-ignore-case t)
|
2008-03-14 07:05:10 +00:00
|
|
|
|
(date (if arg (calendar-read-date t)
|
1994-10-26 15:31:27 +00:00
|
|
|
|
(calendar-current-date)))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(displayed-month (calendar-extract-month date))
|
|
|
|
|
(displayed-year (calendar-extract-year date)))
|
2007-09-07 02:53:10 +00:00
|
|
|
|
(calendar-list-holidays))))
|
1991-08-23 03:01:50 +00:00
|
|
|
|
|
2022-04-27 16:48:16 +00:00
|
|
|
|
(defun holiday-available-holiday-lists ()
|
2022-04-27 12:57:57 +00:00
|
|
|
|
"Return a list of all holiday lists.
|
|
|
|
|
This is used by `list-holidays', and you can customize the return
|
|
|
|
|
value by using `add-function'."
|
|
|
|
|
(delq
|
|
|
|
|
nil
|
|
|
|
|
(list
|
|
|
|
|
(cons "All" calendar-holidays)
|
|
|
|
|
(cons "Equinoxes/Solstices"
|
|
|
|
|
(list (list 'solar-equinoxes-solstices)))
|
|
|
|
|
(if holiday-general-holidays
|
|
|
|
|
(cons "General" holiday-general-holidays))
|
|
|
|
|
(if holiday-local-holidays
|
|
|
|
|
(cons "Local" holiday-local-holidays))
|
|
|
|
|
(if holiday-other-holidays
|
|
|
|
|
(cons "Other" holiday-other-holidays))
|
|
|
|
|
(if holiday-christian-holidays
|
|
|
|
|
(cons "Christian" holiday-christian-holidays))
|
|
|
|
|
(if holiday-hebrew-holidays
|
|
|
|
|
(cons "Hebrew" holiday-hebrew-holidays))
|
|
|
|
|
(if holiday-islamic-holidays
|
|
|
|
|
(cons "Islamic" holiday-islamic-holidays))
|
|
|
|
|
(if holiday-bahai-holidays
|
|
|
|
|
(cons "Bahá’í" holiday-bahai-holidays))
|
|
|
|
|
(if holiday-oriental-holidays
|
|
|
|
|
(cons "Oriental" holiday-oriental-holidays))
|
|
|
|
|
(if holiday-solar-holidays
|
|
|
|
|
(cons "Solar" holiday-solar-holidays))
|
|
|
|
|
(cons "Ask" nil))))
|
|
|
|
|
|
2007-09-15 19:59:25 +00:00
|
|
|
|
;; rms: "Emacs commands to display a list of something generally start
|
|
|
|
|
;; with `list-'. Please make `list-holidays' the principal name."
|
1997-04-11 06:35:54 +00:00
|
|
|
|
;;;###autoload
|
2008-03-26 03:43:43 +00:00
|
|
|
|
(defun list-holidays (y1 &optional y2 l label)
|
1997-04-11 02:38:51 +00:00
|
|
|
|
"Display holidays for years Y1 to Y2 (inclusive).
|
2008-03-27 07:59:33 +00:00
|
|
|
|
Y2 defaults to Y1. The optional list of holidays L defaults to
|
|
|
|
|
`calendar-holidays'. If you want to control what holidays are
|
|
|
|
|
displayed, use a different list. For example,
|
2006-03-11 12:16:32 +00:00
|
|
|
|
|
2007-09-15 19:59:25 +00:00
|
|
|
|
(list-holidays 2006 2006
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(append holiday-general-holidays holiday-local-holidays))
|
2006-03-11 12:16:32 +00:00
|
|
|
|
|
2008-04-07 01:59:37 +00:00
|
|
|
|
will display holidays for the year 2006 defined in the two
|
2006-03-11 12:16:32 +00:00
|
|
|
|
mentioned lists, and nothing else.
|
|
|
|
|
|
2006-03-10 08:04:27 +00:00
|
|
|
|
When called interactively, this command offers a choice of
|
2008-04-07 01:59:37 +00:00
|
|
|
|
holidays, based on the variables `holiday-solar-holidays' etc. See the
|
2006-03-10 08:04:27 +00:00
|
|
|
|
documentation of `calendar-holidays' for a list of the variables
|
|
|
|
|
that control the choices, as well as a description of the format
|
|
|
|
|
of a holiday list.
|
1997-04-11 02:38:51 +00:00
|
|
|
|
|
2022-04-27 12:57:57 +00:00
|
|
|
|
The optional LABEL is used to label the buffer created.
|
|
|
|
|
|
2022-04-27 13:30:25 +00:00
|
|
|
|
The list of holiday lists is computed by the
|
2022-04-27 16:48:16 +00:00
|
|
|
|
`holiday-available-holiday-lists' and you can alter the results
|
|
|
|
|
by redefining that function, or use `add-function' to add
|
2022-04-27 13:30:25 +00:00
|
|
|
|
values."
|
1997-04-11 02:38:51 +00:00
|
|
|
|
(interactive
|
2021-01-21 04:14:25 +00:00
|
|
|
|
(let* ((start-year (calendar-read-sexp
|
|
|
|
|
"Starting year of holidays (>0)"
|
2008-03-08 03:48:33 +00:00
|
|
|
|
(lambda (x) (> x 0))
|
2021-01-21 04:14:25 +00:00
|
|
|
|
(calendar-extract-year (calendar-current-date))))
|
|
|
|
|
(end-year (calendar-read-sexp
|
|
|
|
|
"Ending year (inclusive) of holidays (>=%s)"
|
2008-03-14 07:05:10 +00:00
|
|
|
|
(lambda (x) (>= x start-year))
|
2021-01-21 04:14:25 +00:00
|
|
|
|
start-year
|
|
|
|
|
start-year))
|
1997-04-11 02:38:51 +00:00
|
|
|
|
(completion-ignore-case t)
|
2022-04-27 16:48:16 +00:00
|
|
|
|
(lists (holiday-available-holiday-lists))
|
1997-04-11 02:38:51 +00:00
|
|
|
|
(choice (capitalize
|
|
|
|
|
(completing-read "List (TAB for choices): " lists nil t)))
|
|
|
|
|
(which (if (string-equal choice "Ask")
|
2018-12-01 14:43:37 +00:00
|
|
|
|
(symbol-value (read-variable "Enter list name: "))
|
1997-04-11 02:38:51 +00:00
|
|
|
|
(cdr (assoc choice lists))))
|
|
|
|
|
(name (if (string-equal choice "Equinoxes/Solstices")
|
|
|
|
|
choice
|
1997-05-04 16:02:44 +00:00
|
|
|
|
(if (member choice '("Ask" ""))
|
2003-02-04 13:24:35 +00:00
|
|
|
|
"Holidays"
|
1997-04-11 02:38:51 +00:00
|
|
|
|
(format "%s Holidays" choice)))))
|
|
|
|
|
(list start-year end-year which name)))
|
2008-03-26 03:43:43 +00:00
|
|
|
|
(unless y2 (setq y2 y1))
|
1997-04-11 02:38:51 +00:00
|
|
|
|
(message "Computing holidays...")
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(let ((calendar-holidays (or l calendar-holidays))
|
|
|
|
|
(title (or label "Holidays"))
|
|
|
|
|
(s (calendar-absolute-from-gregorian (list 2 1 y1)))
|
|
|
|
|
(e (calendar-absolute-from-gregorian (list 11 1 y2)))
|
|
|
|
|
(displayed-month 2)
|
|
|
|
|
(displayed-year y1)
|
|
|
|
|
holiday-list)
|
|
|
|
|
(while (<= s e)
|
|
|
|
|
(setq holiday-list (append holiday-list (calendar-holiday-list)))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month displayed-month displayed-year 3)
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(setq s (calendar-absolute-from-gregorian
|
1997-04-11 02:38:51 +00:00
|
|
|
|
(list displayed-month 1 displayed-year))))
|
2021-09-11 15:13:14 +00:00
|
|
|
|
(save-current-buffer
|
2008-03-17 02:20:49 +00:00
|
|
|
|
(calendar-in-read-only-buffer holiday-buffer
|
|
|
|
|
(calendar-set-mode-line
|
|
|
|
|
(if (= y1 y2)
|
|
|
|
|
(format "%s for %s" title y1)
|
|
|
|
|
(format "%s for %s-%s" title y1 y2)))
|
|
|
|
|
(insert
|
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (x) (concat (calendar-date-string (car x))
|
|
|
|
|
": " (cadr x)))
|
|
|
|
|
holiday-list "\n")))
|
1997-05-04 16:02:44 +00:00
|
|
|
|
(message "Computing holidays...done"))))
|
|
|
|
|
|
2007-11-22 04:16:40 +00:00
|
|
|
|
;;;###autoload
|
2007-09-15 19:59:25 +00:00
|
|
|
|
(defalias 'holiday-list 'list-holidays)
|
1997-04-11 02:38:51 +00:00
|
|
|
|
|
2008-03-13 05:54:06 +00:00
|
|
|
|
;;;###diary-autoload
|
2007-09-07 02:53:10 +00:00
|
|
|
|
(defun calendar-check-holidays (date)
|
1991-08-23 03:01:50 +00:00
|
|
|
|
"Check the list of holidays for any that occur on DATE.
|
2011-10-04 17:26:55 +00:00
|
|
|
|
DATE is a list (month day year). This function considers the
|
|
|
|
|
holidays from the list `calendar-holidays', and returns a list of
|
2012-04-09 07:11:39 +00:00
|
|
|
|
strings describing those holidays that apply on DATE, or nil if none do."
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(let ((displayed-month (calendar-extract-month date))
|
|
|
|
|
(displayed-year (calendar-extract-year date))
|
2008-04-01 02:47:40 +00:00
|
|
|
|
holiday-list)
|
|
|
|
|
(dolist (h (calendar-holiday-list) holiday-list)
|
2007-09-07 02:53:10 +00:00
|
|
|
|
(if (calendar-date-equal date (car h))
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(setq holiday-list (append holiday-list (cdr h)))))))
|
1991-08-23 03:01:50 +00:00
|
|
|
|
|
2012-05-05 20:58:14 +00:00
|
|
|
|
|
|
|
|
|
(defun holiday-in-range (d1 d2)
|
|
|
|
|
"Generate a list of all holidays in range from absolute date D1 to D2."
|
|
|
|
|
(let* ((start (calendar-gregorian-from-absolute d1))
|
|
|
|
|
(displayed-month (calendar-extract-month start))
|
|
|
|
|
(displayed-year (calendar-extract-year start))
|
|
|
|
|
(end (calendar-gregorian-from-absolute d2))
|
|
|
|
|
(end-month (calendar-extract-month end))
|
|
|
|
|
(end-year (calendar-extract-year end))
|
|
|
|
|
(number-of-intervals
|
|
|
|
|
(1+ (/ (calendar-interval displayed-month displayed-year
|
|
|
|
|
end-month end-year)
|
|
|
|
|
3)))
|
|
|
|
|
holidays in-range a)
|
|
|
|
|
(calendar-increment-month displayed-month displayed-year 1)
|
2018-12-01 14:43:37 +00:00
|
|
|
|
(dotimes (_ number-of-intervals)
|
2012-05-05 20:58:14 +00:00
|
|
|
|
(setq holidays (append holidays (calendar-holiday-list)))
|
|
|
|
|
(calendar-increment-month displayed-month displayed-year 3))
|
|
|
|
|
(dolist (hol holidays)
|
|
|
|
|
(and (car hol)
|
|
|
|
|
(setq a (calendar-absolute-from-gregorian (car hol)))
|
|
|
|
|
(and (<= d1 a) (<= a d2))
|
|
|
|
|
(setq in-range (append (list hol) in-range))))
|
|
|
|
|
in-range))
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 08:11:47 +00:00
|
|
|
|
(declare-function x-popup-menu "menu.c" (position menu))
|
2008-08-11 01:23:07 +00:00
|
|
|
|
|
2008-03-13 05:54:06 +00:00
|
|
|
|
;;;###cal-autoload
|
2008-06-26 04:54:37 +00:00
|
|
|
|
(defun calendar-cursor-holidays (&optional date event)
|
2008-06-18 02:55:32 +00:00
|
|
|
|
"Find holidays for the date specified by the cursor in the calendar window.
|
|
|
|
|
Optional DATE is a list (month day year) to use instead of the
|
2008-06-26 04:54:37 +00:00
|
|
|
|
cursor position. EVENT specifies a buffer position to use for a date."
|
|
|
|
|
(interactive (list nil last-nonmenu-event))
|
1991-08-23 03:01:50 +00:00
|
|
|
|
(message "Checking holidays...")
|
2008-06-26 04:54:37 +00:00
|
|
|
|
(or date (setq date (calendar-cursor-to-date t event)))
|
|
|
|
|
(let ((date-string (calendar-date-string date))
|
|
|
|
|
(holiday-list (calendar-check-holidays date))
|
|
|
|
|
selection msg)
|
|
|
|
|
(if (mouse-event-p event)
|
|
|
|
|
(and (setq selection (cal-menu-x-popup-menu event
|
|
|
|
|
(format "Holidays for %s" date-string)
|
|
|
|
|
(if holiday-list
|
|
|
|
|
(mapcar 'list holiday-list)
|
|
|
|
|
'("None"))))
|
|
|
|
|
(call-interactively selection))
|
1991-08-23 03:01:50 +00:00
|
|
|
|
(if (not holiday-list)
|
|
|
|
|
(message "No holidays known for %s" date-string)
|
2008-06-26 04:54:37 +00:00
|
|
|
|
(if (<= (length (setq msg
|
|
|
|
|
(format "%s: %s" date-string
|
|
|
|
|
(mapconcat 'identity holiday-list "; "))))
|
|
|
|
|
(frame-width))
|
1996-01-25 00:54:50 +00:00
|
|
|
|
(message "%s" msg)
|
2008-03-17 02:20:49 +00:00
|
|
|
|
(calendar-in-read-only-buffer holiday-buffer
|
|
|
|
|
(calendar-set-mode-line date-string)
|
|
|
|
|
(insert (mapconcat 'identity holiday-list "\n")))
|
2008-06-26 04:54:37 +00:00
|
|
|
|
(message "Checking holidays...done"))))))
|
1991-08-23 03:01:50 +00:00
|
|
|
|
|
2008-04-08 07:08:24 +00:00
|
|
|
|
;; FIXME move to calendar?
|
2008-03-13 05:54:06 +00:00
|
|
|
|
;;;###cal-autoload
|
2009-01-10 22:00:14 +00:00
|
|
|
|
(defun calendar-mark-holidays (&optional event)
|
|
|
|
|
"Mark notable days in the calendar window.
|
|
|
|
|
If EVENT is non-nil, it's an event indicating the buffer position to
|
|
|
|
|
use instead of point."
|
|
|
|
|
(interactive (list last-nonmenu-event))
|
|
|
|
|
;; If called from a menu, with the calendar window not selected.
|
|
|
|
|
(with-current-buffer
|
|
|
|
|
(if event (window-buffer (posn-window (event-start event)))
|
|
|
|
|
(current-buffer))
|
|
|
|
|
(setq calendar-mark-holidays-flag t)
|
|
|
|
|
(message "Marking holidays...")
|
|
|
|
|
(dolist (holiday (calendar-holiday-list))
|
|
|
|
|
(calendar-mark-visible-date (car holiday) calendar-holiday-marker))
|
|
|
|
|
(message "Marking holidays...done")))
|
1991-08-23 03:01:50 +00:00
|
|
|
|
|
|
|
|
|
;; Below are the functions that calculate the dates of holidays; these
|
* holidays.el (calendar-holiday-function-fixed,
calendar-holiday-function-float, calendar-holiday-function-julian,
calendar-holiday-function-islamic,
calendar-holiday-function-hebrew, calendar-holiday-function-sexp,
calendar-holiday-function-advent,
calendar-holiday-function-easter-etc,
calendar-holiday-function-greek-orthodox-easter,
calendar-holiday-function-rosh-hashanah-etc,
calendar-holiday-function-hanukkah,
calendar-holiday-function-passover-etc,
calendar-holiday-function-tisha-b-av-etc): Renamed without words
"calendar" and "function"; changed argument from a list of values to
individual values. Fixed doc strings.
(calendar-holiday-function-if): Removed.
(calendar-holiday-solar-equinoxes-solstices): Renamed
solar-equinoxes-solstices.
(calendar-holiday-list): Rewrote to accomodate the name changes
above and the unquoting of calendar-holidays.
(calendar-cursor-holidays): Change screen-width to frame-width.
(holiday-sexp): Rewritten.
1993-06-22 03:24:23 +00:00
|
|
|
|
;; are eval'ed in the function calendar-holiday-list. If you
|
|
|
|
|
;; write other such functions, be sure to imitate the style used below.
|
|
|
|
|
;; Remember that each function must return a list of items of the form
|
|
|
|
|
;; ((month day year) string) of VISIBLE dates in the calendar window.
|
|
|
|
|
|
|
|
|
|
(defun holiday-fixed (month day string)
|
|
|
|
|
"Holiday on MONTH, DAY (Gregorian) called STRING.
|
|
|
|
|
If MONTH, DAY is visible, the value returned is the list (((MONTH DAY year)
|
|
|
|
|
STRING)). Returns nil if it is not visible in the current calendar window."
|
2008-03-31 01:36:40 +00:00
|
|
|
|
;; This determines whether a given month is visible in the calendar.
|
|
|
|
|
;; cf calendar-date-is-visible-p (which also checks the year part).
|
|
|
|
|
;; The day is irrelevant since only full months are displayed.
|
|
|
|
|
;; Since the calendar displays three months at a time, month N
|
|
|
|
|
;; is visible if displayed-month = N-1, N, N+1.
|
|
|
|
|
;; In particular, November is visible if d-m = 10, 11, 12.
|
|
|
|
|
;; This is useful, because we can do a one-sided test:
|
|
|
|
|
;; November is visible if d-m > 9. (Similarly, February is visible if
|
|
|
|
|
;; d-m < 4.)
|
|
|
|
|
;; To determine if December is visible, we can shift the calendar
|
|
|
|
|
;; back a month and ask if November is visible; to determine if
|
|
|
|
|
;; October is visible, we can shift it forward a month and ask if
|
|
|
|
|
;; November is visible; etc.
|
* holidays.el (calendar-holiday-function-fixed,
calendar-holiday-function-float, calendar-holiday-function-julian,
calendar-holiday-function-islamic,
calendar-holiday-function-hebrew, calendar-holiday-function-sexp,
calendar-holiday-function-advent,
calendar-holiday-function-easter-etc,
calendar-holiday-function-greek-orthodox-easter,
calendar-holiday-function-rosh-hashanah-etc,
calendar-holiday-function-hanukkah,
calendar-holiday-function-passover-etc,
calendar-holiday-function-tisha-b-av-etc): Renamed without words
"calendar" and "function"; changed argument from a list of values to
individual values. Fixed doc strings.
(calendar-holiday-function-if): Removed.
(calendar-holiday-solar-equinoxes-solstices): Renamed
solar-equinoxes-solstices.
(calendar-holiday-list): Rewrote to accomodate the name changes
above and the unquoting of calendar-holidays.
(calendar-cursor-holidays): Change screen-width to frame-width.
(holiday-sexp): Rewritten.
1993-06-22 03:24:23 +00:00
|
|
|
|
(let ((m displayed-month)
|
|
|
|
|
(y displayed-year))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y (- 11 month))
|
2011-12-21 09:58:39 +00:00
|
|
|
|
(if (> m 9) ; Is November visible?
|
2008-03-14 07:05:10 +00:00
|
|
|
|
(list (list (list month day y) string)))))
|
1991-08-23 03:01:50 +00:00
|
|
|
|
|
* holidays.el (calendar-holiday-function-fixed,
calendar-holiday-function-float, calendar-holiday-function-julian,
calendar-holiday-function-islamic,
calendar-holiday-function-hebrew, calendar-holiday-function-sexp,
calendar-holiday-function-advent,
calendar-holiday-function-easter-etc,
calendar-holiday-function-greek-orthodox-easter,
calendar-holiday-function-rosh-hashanah-etc,
calendar-holiday-function-hanukkah,
calendar-holiday-function-passover-etc,
calendar-holiday-function-tisha-b-av-etc): Renamed without words
"calendar" and "function"; changed argument from a list of values to
individual values. Fixed doc strings.
(calendar-holiday-function-if): Removed.
(calendar-holiday-solar-equinoxes-solstices): Renamed
solar-equinoxes-solstices.
(calendar-holiday-list): Rewrote to accomodate the name changes
above and the unquoting of calendar-holidays.
(calendar-cursor-holidays): Change screen-width to frame-width.
(holiday-sexp): Rewritten.
1993-06-22 03:24:23 +00:00
|
|
|
|
(defun holiday-float (month dayname n string &optional day)
|
2008-04-29 03:35:08 +00:00
|
|
|
|
"Holiday called STRING on the Nth DAYNAME after/before MONTH DAY.
|
|
|
|
|
DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on.
|
|
|
|
|
If N>0, use the Nth DAYNAME after MONTH DAY.
|
|
|
|
|
If N<0, use the Nth DAYNAME before MONTH DAY.
|
|
|
|
|
DAY defaults to 1 if N>0, and MONTH's last day otherwise.
|
|
|
|
|
If the holiday is visible in the calendar window, returns a
|
|
|
|
|
list (((month day year) STRING)). Otherwise returns nil."
|
2008-04-01 02:47:40 +00:00
|
|
|
|
;; This is messy because the holiday may be visible, while the date
|
|
|
|
|
;; on which it is based is not. For example, the first Monday after
|
|
|
|
|
;; December 30 may be visible when January is not. For large values
|
|
|
|
|
;; of |n| the problem is more grotesque. If we didn't have to worry
|
|
|
|
|
;; about such cases, we could just use the original version of this
|
|
|
|
|
;; function:
|
2008-03-14 07:05:10 +00:00
|
|
|
|
;; (let ((m displayed-month)
|
|
|
|
|
;; (y displayed-year))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
;; (calendar-increment-month m y (- 11 month))
|
2008-03-14 07:05:10 +00:00
|
|
|
|
;; (if (> m 9); month in year y is visible
|
|
|
|
|
;; (list (list (calendar-nth-named-day n dayname month y day) string)))))
|
1997-05-20 05:17:49 +00:00
|
|
|
|
(let* ((m1 displayed-month)
|
|
|
|
|
(y1 displayed-year)
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(m2 displayed-month)
|
|
|
|
|
(y2 displayed-year)
|
|
|
|
|
(d1 (progn ; first possible base date for holiday
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m1 y1 -1)
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(+ (calendar-nth-named-absday 1 dayname m1 y1)
|
|
|
|
|
(* -7 n)
|
|
|
|
|
(if (> n 0) 1 -7))))
|
|
|
|
|
(d2 ; last possible base date for holiday
|
|
|
|
|
(progn
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m2 y2 1)
|
1997-05-20 05:17:49 +00:00
|
|
|
|
(+ (calendar-nth-named-absday -1 dayname m2 y2)
|
|
|
|
|
(* -7 n)
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(if (> n 0) 7 -1))))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(y1 (calendar-extract-year (calendar-gregorian-from-absolute d1)))
|
|
|
|
|
(y2 (calendar-extract-year (calendar-gregorian-from-absolute d2)))
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(y ; year of base date
|
|
|
|
|
(if (or (= y1 y2) (> month 9))
|
|
|
|
|
y1
|
|
|
|
|
y2))
|
|
|
|
|
(d ; day of base date
|
|
|
|
|
(or day (if (> n 0)
|
|
|
|
|
1
|
|
|
|
|
(calendar-last-day-of-month month y))))
|
|
|
|
|
(date ; base date for holiday
|
|
|
|
|
(calendar-absolute-from-gregorian (list month d y))))
|
|
|
|
|
(and (<= d1 date) (<= date d2)
|
|
|
|
|
(list (list (calendar-nth-named-day n dayname month y d)
|
|
|
|
|
string)))))
|
* holidays.el (calendar-holiday-function-fixed,
calendar-holiday-function-float, calendar-holiday-function-julian,
calendar-holiday-function-islamic,
calendar-holiday-function-hebrew, calendar-holiday-function-sexp,
calendar-holiday-function-advent,
calendar-holiday-function-easter-etc,
calendar-holiday-function-greek-orthodox-easter,
calendar-holiday-function-rosh-hashanah-etc,
calendar-holiday-function-hanukkah,
calendar-holiday-function-passover-etc,
calendar-holiday-function-tisha-b-av-etc): Renamed without words
"calendar" and "function"; changed argument from a list of values to
individual values. Fixed doc strings.
(calendar-holiday-function-if): Removed.
(calendar-holiday-solar-equinoxes-solstices): Renamed
solar-equinoxes-solstices.
(calendar-holiday-list): Rewrote to accomodate the name changes
above and the unquoting of calendar-holidays.
(calendar-cursor-holidays): Change screen-width to frame-width.
(holiday-sexp): Rewritten.
1993-06-22 03:24:23 +00:00
|
|
|
|
|
2008-04-03 04:10:43 +00:00
|
|
|
|
(defun holiday-filter-visible-calendar (hlist)
|
|
|
|
|
"Filter list of holidays HLIST, and return only the visible ones.
|
|
|
|
|
HLIST is a list of elements of the form (DATE) TEXT."
|
|
|
|
|
(delq nil (mapcar (lambda (p)
|
|
|
|
|
(and (car p) (calendar-date-is-visible-p (car p)) p))
|
|
|
|
|
hlist)))
|
2008-03-14 07:05:10 +00:00
|
|
|
|
|
* holidays.el (calendar-holiday-function-fixed,
calendar-holiday-function-float, calendar-holiday-function-julian,
calendar-holiday-function-islamic,
calendar-holiday-function-hebrew, calendar-holiday-function-sexp,
calendar-holiday-function-advent,
calendar-holiday-function-easter-etc,
calendar-holiday-function-greek-orthodox-easter,
calendar-holiday-function-rosh-hashanah-etc,
calendar-holiday-function-hanukkah,
calendar-holiday-function-passover-etc,
calendar-holiday-function-tisha-b-av-etc): Renamed without words
"calendar" and "function"; changed argument from a list of values to
individual values. Fixed doc strings.
(calendar-holiday-function-if): Removed.
(calendar-holiday-solar-equinoxes-solstices): Renamed
solar-equinoxes-solstices.
(calendar-holiday-list): Rewrote to accomodate the name changes
above and the unquoting of calendar-holidays.
(calendar-cursor-holidays): Change screen-width to frame-width.
(holiday-sexp): Rewritten.
1993-06-22 03:24:23 +00:00
|
|
|
|
(defun holiday-sexp (sexp string)
|
1992-08-12 12:50:10 +00:00
|
|
|
|
"Sexp holiday for dates in the calendar window.
|
2008-04-01 02:47:40 +00:00
|
|
|
|
SEXP is an expression in variable `year' that is evaluated to
|
|
|
|
|
give `date'. STRING is an expression in `date' that evaluates to
|
|
|
|
|
the holiday description of `date'. If `date' is visible in the
|
|
|
|
|
calendar window, the holiday STRING is on that date. If date is
|
|
|
|
|
nil, or if the date is not visible, there is no holiday."
|
1992-08-12 12:50:10 +00:00
|
|
|
|
(let ((m displayed-month)
|
2018-12-01 14:43:37 +00:00
|
|
|
|
(y displayed-year))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y -1)
|
2007-09-07 02:53:10 +00:00
|
|
|
|
(holiday-filter-visible-calendar
|
2021-08-01 15:05:48 +00:00
|
|
|
|
(calendar-dlet (year date)
|
2018-12-01 14:43:37 +00:00
|
|
|
|
(list
|
|
|
|
|
(progn
|
|
|
|
|
(setq year y
|
|
|
|
|
date (eval sexp t))
|
|
|
|
|
(list date (if date (eval string t))))
|
|
|
|
|
(progn
|
|
|
|
|
(setq year (1+ y)
|
|
|
|
|
date (eval sexp t))
|
|
|
|
|
(list date (if date (eval string t)))))))))
|
2008-04-01 02:47:40 +00:00
|
|
|
|
|
* holidays.el (calendar-holiday-function-fixed,
calendar-holiday-function-float, calendar-holiday-function-julian,
calendar-holiday-function-islamic,
calendar-holiday-function-hebrew, calendar-holiday-function-sexp,
calendar-holiday-function-advent,
calendar-holiday-function-easter-etc,
calendar-holiday-function-greek-orthodox-easter,
calendar-holiday-function-rosh-hashanah-etc,
calendar-holiday-function-hanukkah,
calendar-holiday-function-passover-etc,
calendar-holiday-function-tisha-b-av-etc): Renamed without words
"calendar" and "function"; changed argument from a list of values to
individual values. Fixed doc strings.
(calendar-holiday-function-if): Removed.
(calendar-holiday-solar-equinoxes-solstices): Renamed
solar-equinoxes-solstices.
(calendar-holiday-list): Rewrote to accomodate the name changes
above and the unquoting of calendar-holidays.
(calendar-cursor-holidays): Change screen-width to frame-width.
(holiday-sexp): Rewritten.
1993-06-22 03:24:23 +00:00
|
|
|
|
|
2004-12-07 00:58:02 +00:00
|
|
|
|
(defun holiday-advent (&optional n string)
|
|
|
|
|
"Date of Nth day after advent (named STRING), if visible in calendar window.
|
|
|
|
|
Negative values of N are interpreted as days before advent.
|
|
|
|
|
STRING is used purely for display purposes. The return value has
|
|
|
|
|
the form ((MONTH DAY YEAR) STRING), where the date is that of the
|
|
|
|
|
Nth day before or after advent.
|
|
|
|
|
|
2004-12-07 12:22:19 +00:00
|
|
|
|
For backwards compatibility, if this function is called with no
|
2004-12-07 00:58:02 +00:00
|
|
|
|
arguments, then it returns the value appropriate for advent itself."
|
2004-12-07 12:22:19 +00:00
|
|
|
|
;; Backwards compatibility layer.
|
2004-12-07 00:58:02 +00:00
|
|
|
|
(if (not n)
|
|
|
|
|
(holiday-advent 0 "Advent")
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(let* ((year displayed-year)
|
|
|
|
|
(month displayed-month)
|
|
|
|
|
(advent (progn
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month month year -1)
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(calendar-gregorian-from-absolute
|
|
|
|
|
(+ n
|
|
|
|
|
(calendar-dayname-on-or-before
|
|
|
|
|
0
|
|
|
|
|
(calendar-absolute-from-gregorian
|
|
|
|
|
(list 12 3 year))))))))
|
|
|
|
|
(if (calendar-date-is-visible-p advent)
|
|
|
|
|
(list (list advent string))))))
|
2004-09-22 23:19:58 +00:00
|
|
|
|
|
2004-12-07 00:46:08 +00:00
|
|
|
|
(defun holiday-easter-etc (&optional n string)
|
|
|
|
|
"Date of Nth day after Easter (named STRING), if visible in calendar window.
|
|
|
|
|
Negative values of N are interpreted as days before Easter.
|
|
|
|
|
STRING is used purely for display purposes. The return value has
|
|
|
|
|
the form ((MONTH DAY YEAR) STRING), where the date is that of the
|
|
|
|
|
Nth day before or after Easter.
|
|
|
|
|
|
2004-12-07 12:22:19 +00:00
|
|
|
|
For backwards compatibility, if this function is called with no
|
2004-12-07 00:46:08 +00:00
|
|
|
|
arguments, then it returns a list of \"standard\" Easter-related
|
2008-04-04 04:38:58 +00:00
|
|
|
|
holidays (with more entries if `calendar-christian-all-holidays-flag'
|
2004-12-07 00:46:08 +00:00
|
|
|
|
is non-nil)."
|
2004-12-07 12:22:19 +00:00
|
|
|
|
;; Backwards compatibility layer.
|
2004-12-07 00:46:08 +00:00
|
|
|
|
(if (not n)
|
2008-04-03 04:10:43 +00:00
|
|
|
|
(apply 'append
|
|
|
|
|
(mapcar (lambda (e)
|
|
|
|
|
(apply 'holiday-easter-etc e))
|
|
|
|
|
;; The combined list is not in order.
|
|
|
|
|
(append
|
2008-04-04 04:38:58 +00:00
|
|
|
|
(if calendar-christian-all-holidays-flag
|
2008-04-03 04:10:43 +00:00
|
|
|
|
'((-63 "Septuagesima Sunday")
|
|
|
|
|
(-56 "Sexagesima Sunday")
|
|
|
|
|
(-49 "Shrove Sunday")
|
|
|
|
|
(-48 "Shrove Monday")
|
|
|
|
|
(-47 "Shrove Tuesday")
|
|
|
|
|
(-14 "Passion Sunday")
|
|
|
|
|
(-7 "Palm Sunday")
|
|
|
|
|
(-3 "Maundy Thursday")
|
|
|
|
|
(35 "Rogation Sunday")
|
|
|
|
|
(39 "Ascension Day")
|
|
|
|
|
(49 "Pentecost (Whitsunday)")
|
|
|
|
|
(50 "Whitmonday")
|
|
|
|
|
(56 "Trinity Sunday")
|
|
|
|
|
(60 "Corpus Christi")))
|
|
|
|
|
'((-46 "Ash Wednesday")
|
|
|
|
|
(-2 "Good Friday")
|
|
|
|
|
(0 "Easter Sunday")))))
|
2004-12-07 00:46:08 +00:00
|
|
|
|
(let* ((century (1+ (/ displayed-year 100)))
|
2008-03-08 21:07:21 +00:00
|
|
|
|
(shifted-epact ; age of moon for April 5...
|
2008-03-15 02:55:45 +00:00
|
|
|
|
(% (+ 14 (* 11 (% displayed-year 19)) ; ...by Nicaean rule
|
2008-03-08 21:07:21 +00:00
|
|
|
|
(- ; ...corrected for the Gregorian century rule
|
2004-12-07 00:46:08 +00:00
|
|
|
|
(/ (* 3 century) 4))
|
2008-03-14 07:05:10 +00:00
|
|
|
|
(/ ; ...corrected for Metonic cycle inaccuracy
|
2004-12-07 00:46:08 +00:00
|
|
|
|
(+ 5 (* 8 century)) 25)
|
2008-03-15 02:55:45 +00:00
|
|
|
|
(* 30 century)) ; keeps value positive
|
2004-12-07 00:46:08 +00:00
|
|
|
|
30))
|
2008-03-15 02:55:45 +00:00
|
|
|
|
(adjusted-epact ; adjust for 29.5 day month
|
2004-12-07 00:46:08 +00:00
|
|
|
|
(if (or (zerop shifted-epact)
|
|
|
|
|
(and (= shifted-epact 1) (< 10 (% displayed-year 19))))
|
|
|
|
|
(1+ shifted-epact)
|
|
|
|
|
shifted-epact))
|
2008-03-08 21:07:21 +00:00
|
|
|
|
(paschal-moon ; day after the full moon on or after March 21
|
2004-12-07 00:46:08 +00:00
|
|
|
|
(- (calendar-absolute-from-gregorian (list 4 19 displayed-year))
|
|
|
|
|
adjusted-epact))
|
2008-04-03 04:10:43 +00:00
|
|
|
|
(abs-easter (calendar-dayname-on-or-before 0 (+ paschal-moon 7)))
|
|
|
|
|
(greg (calendar-gregorian-from-absolute (+ abs-easter n))))
|
|
|
|
|
(if (calendar-date-is-visible-p greg)
|
|
|
|
|
(list (list greg string))))))
|
1991-08-23 03:01:50 +00:00
|
|
|
|
|
2007-11-27 04:17:22 +00:00
|
|
|
|
;; Prior call to calendar-julian-from-absolute will autoload cal-julian.
|
2008-04-04 07:06:53 +00:00
|
|
|
|
(declare-function calendar-julian-to-absolute "cal-julian" (date))
|
2007-11-27 04:17:22 +00:00
|
|
|
|
|
2015-08-13 19:16:25 +00:00
|
|
|
|
(defun holiday-greek-orthodox-easter (&optional n string)
|
|
|
|
|
"Date of Nth day after Easter (named STRING), if visible in calendar window.
|
|
|
|
|
It is calculated according to the rule of the Council of Nicaea.
|
|
|
|
|
Negative values of N are interpreted as days before Easter.
|
|
|
|
|
STRING is used purely for display purposes. The return value has
|
|
|
|
|
the form ((MONTH DAY YEAR) STRING), where the date is that of the
|
|
|
|
|
Nth day before or after Easter.
|
|
|
|
|
|
|
|
|
|
For backwards compatibility, if this function is called with no
|
|
|
|
|
arguments, it returns the date of Pascha (Greek Orthodox Easter)."
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(let* ((m displayed-month)
|
|
|
|
|
(y displayed-year)
|
|
|
|
|
(julian-year (progn
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y 1)
|
|
|
|
|
(calendar-extract-year
|
2008-04-01 02:47:40 +00:00
|
|
|
|
(calendar-julian-from-absolute
|
|
|
|
|
(calendar-absolute-from-gregorian
|
|
|
|
|
(list m (calendar-last-day-of-month m y) y))))))
|
|
|
|
|
(shifted-epact ; age of moon for April 5
|
|
|
|
|
(% (+ 14
|
|
|
|
|
(* 11 (% julian-year 19)))
|
|
|
|
|
30))
|
|
|
|
|
(paschal-moon ; day after full moon on or after March 21
|
2008-04-04 07:06:53 +00:00
|
|
|
|
(- (calendar-julian-to-absolute (list 4 19 julian-year))
|
2008-04-01 02:47:40 +00:00
|
|
|
|
shifted-epact))
|
2015-08-13 19:16:25 +00:00
|
|
|
|
(abs-easter (calendar-dayname-on-or-before 0 (+ paschal-moon 7)))
|
|
|
|
|
(greg (calendar-gregorian-from-absolute (+ abs-easter (or n 0)))))
|
|
|
|
|
(if (calendar-date-is-visible-p greg)
|
|
|
|
|
(list (list greg (or string "Pascha (Greek Orthodox Easter)"))))))
|
1992-08-12 12:50:10 +00:00
|
|
|
|
|
1992-03-16 20:39:07 +00:00
|
|
|
|
(provide 'holidays)
|
|
|
|
|
|
1992-05-30 23:12:08 +00:00
|
|
|
|
;;; holidays.el ends here
|