diff options
| author | Karl Heuer | 1998-09-10 16:03:07 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-09-10 16:03:07 +0000 |
| commit | 94d1817dffc53403bf790a7eb55d25a8ec726ea8 (patch) | |
| tree | 4c8fca349a1dd7627c36bd99080c08ab7006e1e1 /lisp | |
| parent | e63d9e3174576261f0dad5a30c1cdca0cb503e6d (diff) | |
| download | emacs-94d1817dffc53403bf790a7eb55d25a8ec726ea8.tar.gz emacs-94d1817dffc53403bf790a7eb55d25a8ec726ea8.zip | |
(mark-sexp-diary-entries): Avoid infinite loop when
sexp entry ends at end of file with no newline.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/calendar/diary-lib.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 615040deba4..65f34c64474 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -842,7 +842,8 @@ is marked. See the documentation for the function `list-sexp-diary-entries'." | |||
| 842 | (setq entry-start (point)) | 842 | (setq entry-start (point)) |
| 843 | (re-search-forward "\^M\\|\n" nil t) | 843 | (re-search-forward "\^M\\|\n" nil t) |
| 844 | (while (looking-at " \\|\^I") | 844 | (while (looking-at " \\|\^I") |
| 845 | (re-search-forward "\^M\\|\n" nil t)) | 845 | (or (re-search-forward "\^M\\|\n" nil t) |
| 846 | (re-search-forward "$" nil t))) | ||
| 846 | (backward-char 1) | 847 | (backward-char 1) |
| 847 | (setq entry (buffer-substring-no-properties entry-start (point))) | 848 | (setq entry (buffer-substring-no-properties entry-start (point))) |
| 848 | (while (string-match "[\^M]" entry) | 849 | (while (string-match "[\^M]" entry) |