]> git.eshelyaron.com Git - emacs.git/commitdiff
(list-diary-entries): Don't try to go forward at
authorGerd Moellmann <gerd@gnu.org>
Wed, 1 Mar 2000 10:28:44 +0000 (10:28 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 1 Mar 2000 10:28:44 +0000 (10:28 +0000)
the end of the buffer.

lisp/calendar/diary-lib.el

index c8d88a2549db4e01691e5feb24660c639d2a9d66..4fdebb81e1293bc28ca3ae79dfba83ef2c222e42 100644 (file)
@@ -255,10 +255,12 @@ These hooks have the following distinct roles:
             (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"))