1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 13:40:36 -08:00

(calendar-cursor-to-date): Fix to signal error when appropriate.

This commit is contained in:
Roland McGrath 1994-04-05 01:34:09 +00:00
parent 100aa77cf6
commit 1beddd9bb1

View file

@ -1962,12 +1962,12 @@ ERROR is t, otherwise just returns nil."
(list month
(string-to-int (buffer-substring (1+ (point)) (+ 4 (point))))
year))
(if (looking-at "\\*")
(save-excursion
(re-search-backward "[^*]")
(if (looking-at ".\\*\\*")
(list month starred-day year)
(if error (error "Cursor is not on a date!"))))))))
(if (and (looking-at "\\*")
(save-excursion
(re-search-backward "[^*]")
(looking-at ".\\*\\*")))
(list month starred-day year)
(if error (error "Cursor is not on a date!"))))))
(defun calendar-cursor-to-nearest-date ()
"Move the cursor to the closest date.