Commit 94d1817d authored by Karl Heuer's avatar Karl Heuer
Browse files

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

sexp entry ends at end of file with no newline.
parent e63d9e31
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment