changeset 27918:a71031623500

(list-diary-entries): Don't try to go forward at the end of the buffer.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 01 Mar 2000 10:28:44 +0000
parents b54fc217c5c8
children aff9b488af48
files lisp/calendar/diary-lib.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/diary-lib.el	Wed Mar 01 10:27:54 2000 +0000
+++ b/lisp/calendar/diary-lib.el	Wed Mar 01 10:28:44 2000 +0000
@@ -255,10 +255,12 @@
             (let ((buffer-read-only nil)
                   (diary-modified (buffer-modified-p))
                   (mark (regexp-quote diary-nonmarking-symbol)))
+              ;; First and last characters must be ^M or \n for
+              ;; selective display to work properly
               (goto-char (1- (point-max)))
               (if (not (looking-at "\^M\\|\n"))
                   (progn
-                    (forward-char 1)
+                    (goto-char (point-max))
                     (insert-string "\^M")))
               (goto-char (point-min))
               (if (not (looking-at "\^M\\|\n"))