]> git.eshelyaron.com Git - emacs.git/commitdiff
(calendar-cursor-to-date): Fix to signal error when appropriate.
authorRoland McGrath <roland@gnu.org>
Tue, 5 Apr 1994 01:34:09 +0000 (01:34 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 5 Apr 1994 01:34:09 +0000 (01:34 +0000)
lisp/calendar/calendar.el

index b1495c456339470d5f8fe34464c19f5004f782f8..124125f88df59aff730a1175d296037641973f32 100644 (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.