aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calendar/diary-lib.el
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1998-09-13 03:45:02 +0000
committerKarl Heuer <[email protected]>1998-09-13 03:45:02 +0000
commit7ff020486d03859e1608a479cbad72a039a75489 (patch)
treed82a3f469dfca101ddb65ac51ad0306770146fa1 /lisp/calendar/diary-lib.el
parent7dd24f026123230877fd087b20d5ec6a56126c51 (diff)
(mark-sexp-diary-entries): Fix previous chg.
Diffstat (limited to 'lisp/calendar/diary-lib.el')
-rw-r--r--lisp/calendar/diary-lib.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 65f34c6447..2f0dfd7cfc 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -840,11 +840,14 @@ is marked. See the documentation for the function `list-sexp-diary-entries'."
(backward-char 1)
(setq entry ""))
(setq entry-start (point))
+ ;; Find end of entry
(re-search-forward "\^M\\|\n" nil t)
(while (looking-at " \\|\^I")
(or (re-search-forward "\^M\\|\n" nil t)
(re-search-forward "$" nil t)))
- (backward-char 1)
+ (if (or (char-equal (preceding-char) ?\^M)
+ (char-equal (preceding-char) ?\n))
+ (backward-char 1))
(setq entry (buffer-substring-no-properties entry-start (point)))
(while (string-match "[\^M]" entry)
(aset entry (match-beginning 0) ?\n )))