changeset 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 01c23b1e1c32
children b31869394e03
files lisp/calendar/diary-lib.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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)