From 1beddd9bb17be71824d52b6a6d4bf7cb045f456a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 5 Apr 1994 01:34:09 +0000 Subject: [PATCH] (calendar-cursor-to-date): Fix to signal error when appropriate. --- lisp/calendar/calendar.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index b1495c45633..124125f88df 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -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. -- 2.39.5