Function: holiday-sexp

holiday-sexp is a byte-compiled function defined in holidays.el.gz.

Signature

(holiday-sexp SEXP STRING)

Documentation

Sexp holiday for dates in the calendar window.

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.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/holidays.el.gz
(defun holiday-sexp (sexp string)
  "Sexp holiday for dates in the calendar window.
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."
  (let ((m displayed-month)
        (y displayed-year))
    (calendar-increment-month m y -1)
    (holiday-filter-visible-calendar
     (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)))))))))