# HG changeset patch # User Edward M. Reingold # Date 783476733 0 # Node ID 5586959f339313b1ffb384ff42f616c32fd29bcf # Parent 49e984bf66892009429ac550a501fe56ddcd79ad Redo the noday option for calendar-read-date. diff -r 49e984bf6689 -r 5586959f3393 lisp/calendar/calendar.el --- a/lisp/calendar/calendar.el Sat Oct 29 23:25:10 1994 +0000 +++ b/lisp/calendar/calendar.el Sun Oct 30 00:25:33 1994 +0000 @@ -1096,8 +1096,7 @@ (interactive "P") (set-buffer (get-buffer-create calendar-buffer)) (calendar-mode) - (let* ((completion-ignore-case t) - (pop-up-windows t) + (let* ((pop-up-windows t) (split-height-threshold 1000) (date (if arg (calendar-read-date t) @@ -1975,9 +1974,7 @@ (defun calendar-other-month (month year) "Display a three-month calendar centered around MONTH and YEAR." - (interactive - (let* ((completion-ignore-case t)) - (calendar-read-date t))) + (interactive (calendar-read-date 'noday)) (if (and (= month displayed-month) (= year displayed-year)) nil @@ -2052,7 +2049,8 @@ (defun calendar-read-date (&optional noday) "Prompt for Gregorian date. Returns a list (month day year). If optional NODAY is t, does not ask for day, but just returns -(month nil year)." +(month nil year); if NODAY is any other non-nil value the value returned is +(month year) " (let* ((year (calendar-read "Year (>0): " '(lambda (x) (> x 0)) @@ -2068,13 +2066,14 @@ nil t)) (calendar-make-alist month-array 1 'capitalize)))) (last (calendar-last-day-of-month month year))) - (list month - (if noday - nil - (day (calendar-read - (format "Day (1-%d): " last) - '(lambda (x) (and (< 0 x) (<= x last)))))) - year))) + (if noday + (if (eq noday t) + (list month nil year) + (list month year)) + (list month + (calendar-read (format "Day (1-%d): " last) + '(lambda (x) (and (< 0 x) (<= x last)))) + year)))) (defun calendar-goto-date (date) "Move cursor to DATE."