From: Stefan Monnier Date: Wed, 26 Mar 2008 03:43:43 +0000 (+0000) Subject: (list-holidays): Make Y2 optional. X-Git-Tag: emacs-pretest-23.0.90~6908 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=96ffea61b9edbc8fea4f6df24a22292f4d8914d7;p=emacs.git (list-holidays): Make Y2 optional. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d9ec558f302..dd16a81ea9a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2008-03-26 Stefan Monnier + * calendar/holidays.el (list-holidays): Make Y2 optional. + * calendar/appt.el (appt-buffer-name): Don't use a leading space for buffers shown to the user. (appt-disp-window): Disable undo explicitly now that the leading space diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 688ea9bf89e..55323597576 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -127,7 +127,7 @@ This function is suitable for execution in a .emacs file." ;; rms: "Emacs commands to display a list of something generally start ;; with `list-'. Please make `list-holidays' the principal name." ;;;###autoload -(defun list-holidays (y1 y2 &optional l label) +(defun list-holidays (y1 &optional y2 l label) "Display holidays for years Y1 to Y2 (inclusive). The optional list of holidays L defaults to `calendar-holidays'. @@ -185,9 +185,9 @@ The optional LABEL is used to label the buffer created." "Holidays" (format "%s Holidays" choice))))) (list start-year end-year which name))) + (unless y2 (setq y2 y1)) (message "Computing holidays...") - (let* ((holiday-buffer "*Holidays*") - (calendar-holidays (if l l calendar-holidays)) + (let* ((calendar-holidays (if l l calendar-holidays)) (title (or label "Holidays")) (holiday-list nil) (s (calendar-absolute-from-gregorian (list 2 1 y1)))