1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-19 22:50:29 -08:00

(mark-sexp-diary-entries): Avoid infinite loop when

sexp entry ends at end of file with no newline.
This commit is contained in:
Karl Heuer 1998-09-10 16:03:07 +00:00
parent e63d9e3174
commit 94d1817dff

View 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)