]> git.eshelyaron.com Git - emacs.git/commitdiff
(mark-sexp-diary-entries): Avoid infinite loop when
authorKarl Heuer <kwzh@gnu.org>
Thu, 10 Sep 1998 16:03:07 +0000 (16:03 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 10 Sep 1998 16:03:07 +0000 (16:03 +0000)
sexp entry ends at end of file with no newline.

lisp/calendar/diary-lib.el

index 615040deba4e8b4445549b150aa93e1d92a8f50d..65f34c6447494d8ea8443a556c2893477cd4bd3c 100644 (file)
@@ -842,7 +842,8 @@ is marked.  See the documentation for the function `list-sexp-diary-entries'."
           (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)