# HG changeset patch # User Glenn Morris # Date 1213757732 0 # Node ID f0d44d21e743c8377e49045780d7ec99b38ba934 # Parent ee2671797b7390347e6901c6cd0807130a5af3a1 (calendar-cursor-holidays): Accept optional date. diff -r ee2671797b73 -r f0d44d21e743 lisp/calendar/holidays.el --- a/lisp/calendar/holidays.el Wed Jun 18 02:55:13 2008 +0000 +++ b/lisp/calendar/holidays.el Wed Jun 18 02:55:32 2008 +0000 @@ -625,12 +625,14 @@ 'check-calendar-holidays 'calendar-check-holidays "23.1") ;;;###cal-autoload -(defun calendar-cursor-holidays () - "Find holidays for the date specified by the cursor in the calendar window." +(defun calendar-cursor-holidays (&optional date) + "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 +cursor position." (interactive) (message "Checking holidays...") - (let* ((date (calendar-cursor-to-date t)) - (date-string (calendar-date-string date)) + (or date (setq date (calendar-cursor-to-date t))) + (let* ((date-string (calendar-date-string date)) (holiday-list (calendar-check-holidays date)) (holiday-string (mapconcat 'identity holiday-list "; ")) (msg (format "%s: %s" date-string holiday-string)))