-;;; holidays.el --- holiday functions for the calendar package
+;;; holidays.el --- holiday functions for the calendar package -*- lexical-binding:t -*-
;; Copyright (C) 1989-1990, 1992-1994, 1997, 2001-2018 Free Software
;; Foundation, Inc.
(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)
+ :type 'sexp)
;;;###autoload
(put 'holiday-general-holidays 'risky-local-variable t)
"Oriental holidays.
See the documentation for `calendar-holidays' for details."
:version "23.1" ; added more holidays
- :type 'sexp
- :group 'holidays)
+ :type 'sexp)
;;;###autoload
(put 'holiday-oriental-holidays 'risky-local-variable t)
(defcustom holiday-local-holidays nil
"Local holidays.
See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
+ :type 'sexp)
;;;###autoload
(put 'holiday-local-holidays 'risky-local-variable t)
(defcustom holiday-other-holidays nil
"User defined holidays.
See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
+ :type 'sexp)
;;;###autoload
(put 'holiday-other-holidays 'risky-local-variable t)
"Jewish holidays.
See the documentation for `calendar-holidays' for details."
:type 'sexp
- :version "23.1" ; removed dependency on hebrew-holidays-N
- :group 'holidays)
+ :version "23.1") ; removed dependency on hebrew-holidays-N
+
;;;###autoload
(put 'holiday-hebrew-holidays 'risky-local-variable t)
(holiday-advent 0 "Advent")))))
"Christian holidays.
See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
+ :type 'sexp)
;;;###autoload
(put 'holiday-christian-holidays 'risky-local-variable t)
(holiday-islamic 12 10 "Id-al-Adha")))))
"Islamic holidays.
See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
+ :type 'sexp)
;;;###autoload
(put 'holiday-islamic-holidays 'risky-local-variable t)
(holiday-fixed 11 28 "Ascension of `Abdu’l-Bahá")))))
"Bahá’í holidays.
See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
+ :type 'sexp)
;;;###autoload
(put 'holiday-bahai-holidays 'risky-local-variable t)
calendar-daylight-time-zone-name)))))
"Sun-related holidays.
See the documentation for `calendar-holidays' for details."
- :type 'sexp
- :group 'holidays)
+ :type 'sexp)
;;;###autoload
(put 'holiday-solar-holidays 'risky-local-variable t)
with descriptive strings such as
(((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... )."
- :type 'sexp
- :group 'holidays)
+ :type 'sexp)
;;;###autoload
(put 'calendar-holidays 'risky-local-variable t)
(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'."
- (let (res h err)
+ (let (res h)
(sort
(dolist (p calendar-holidays res)
(if (setq h (if calendar-debug-sexp
(let ((debug-on-error t))
- (eval p))
+ (eval p t))
(condition-case err
- (eval p)
+ (eval p t)
(error
(display-warning
'holidays
(choice (capitalize
(completing-read "List (TAB for choices): " lists nil t)))
(which (if (string-equal choice "Ask")
- (eval (read-variable "Enter list name: "))
+ (symbol-value (read-variable "Enter list name: "))
(cdr (assoc choice lists))))
(name (if (string-equal choice "Equinoxes/Solstices")
choice
3)))
holidays in-range a)
(calendar-increment-month displayed-month displayed-year 1)
- (dotimes (_idummy number-of-intervals)
+ (dotimes (_ number-of-intervals)
(setq holidays (append holidays (calendar-holiday-list)))
(calendar-increment-month displayed-month displayed-year 3))
(dolist (hol holidays)
calendar window, the holiday STRING is on that date. If date is
nil, or if the date is not visible, there is no holiday."
(let ((m displayed-month)
- (y displayed-year)
- year date)
+ (y displayed-year))
(calendar-increment-month m y -1)
(holiday-filter-visible-calendar
- (list
- (progn
- (setq year y
- date (eval sexp))
- (list date (if date (eval string))))
- (progn
- (setq year (1+ y)
- date (eval sexp))
- (list date (if date (eval string))))))))
+ (calendar-dlet* (year date)
+ (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)))))))))
(defun holiday-advent (&optional n string)