Mercurial > emacs
changeset 6672:12aafd560832
(calendar-cursor-to-date): Fix to signal error when appropriate.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Tue, 05 Apr 1994 01:34:09 +0000 |
parents | 5b26038687ed |
children | 137122de77ef |
files | lisp/calendar/calendar.el |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/calendar.el Tue Apr 05 01:21:06 1994 +0000 +++ b/lisp/calendar/calendar.el Tue Apr 05 01:34:09 1994 +0000 @@ -1962,12 +1962,12 @@ (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.