diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-10-04 12:57:04 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-10-04 12:57:04 +0300 |
commit | 2b2d8ce41edee0ef8f27ccf5c7b5e4233b3f20bc (patch) | |
tree | 91cccabf2f9312ac6f95ed0aa4f9f8adc36b1438 | |
parent | 0a53e5f751244d84d766b45380a58df37c06ae3d (diff) | |
download | emacs-2b2d8ce41edee0ef8f27ccf5c7b5e4233b3f20bc.tar.gz emacs-2b2d8ce41edee0ef8f27ccf5c7b5e4233b3f20bc.tar.bz2 emacs-2b2d8ce41edee0ef8f27ccf5c7b5e4233b3f20bc.zip |
Avoid errors in interactive calls of 'calendar-goto-day-of-year'
* lisp/calendar/cal-move.el (calendar-goto-day-of-year): Fix the
default value of DAY; doc fix. (Bug#58283)
-rw-r--r-- | lisp/calendar/cal-move.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index 4febad53fc5..211e0f1e62d 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -384,7 +384,8 @@ Moves forward if ARG is negative." ;;;###cal-autoload (defun calendar-goto-day-of-year (year day &optional noecho) "Move cursor to YEAR, DAY number; echo DAY/YEAR unless NOECHO is non-nil. -Negative DAY counts backward from end of year." +Negative DAY counts backward from end of year. +Interactively, prompt for YEAR and DAY number." (interactive (let* ((year (calendar-read-sexp "Year (>0)" @@ -394,7 +395,7 @@ Negative DAY counts backward from end of year." (day (calendar-read-sexp "Day number (+/- 1-%d)" (lambda (x) (and (<= 1 (abs x)) (<= (abs x) last))) - nil + (calendar-day-number (calendar-current-date)) last))) (list year day))) (calendar-goto-date |