diff lisp/calendar/diary-lib.el @ 23232:97332957a969

(mark-sexp-diary-entries): Avoid infinite loop when sexp entry ends at end of file with no newline.
author Karl Heuer <kwzh@gnu.org>
date Thu, 10 Sep 1998 16:03:07 +0000
parents 07b9777e6713
children 1f91824c4087
line wrap: on
line diff
--- a/lisp/calendar/diary-lib.el	Thu Sep 10 16:01:37 1998 +0000
+++ b/lisp/calendar/diary-lib.el	Thu Sep 10 16:03:07 1998 +0000
@@ -842,7 +842,8 @@
           (setq entry-start (point))
           (re-search-forward "\^M\\|\n" nil t)
           (while (looking-at " \\|\^I")
-            (re-search-forward "\^M\\|\n" nil t))
+ 	    (or (re-search-forward "\^M\\|\n" nil t)
+ 		(re-search-forward "$" nil t)))
           (backward-char 1)
           (setq entry (buffer-substring-no-properties entry-start (point)))
           (while (string-match "[\^M]" entry)