diary-lib fix for bug#7536.
authorStephen Berman <stephen.berman@gmx.net>
Thu, 9 Dec 2010 01:50:08 +0000 (17:50 -0800)
committerGlenn Morris <rgm@gnu.org>
Thu, 9 Dec 2010 01:50:08 +0000 (17:50 -0800)
* lisp/calendar/diary-lib.el (diary-list-sexp-entries):
Handle case of no newline at end of file.

lisp/ChangeLog
lisp/calendar/diary-lib.el

index 4b81098..d8edf10 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-09  Stephen Berman  <stephen.berman@gmx.net>
+
+       * calendar/diary-lib.el (diary-list-sexp-entries):
+       Handle case of no newline at end of file.  (Bug#7536)
+
 2010-12-09  Glenn Morris  <rgm@gnu.org>
 
        * mail/smtpmail.el (smtpmail-send-it): Revert previous change.
index 219e489..899c142 100644 (file)
@@ -1744,7 +1744,7 @@ best if they are non-marking."
         (forward-line 1)
         (while (looking-at "[ \t]")
           (forward-line 1))
-        (backward-char 1)
+        (if (bolp) (backward-char 1))
         (setq entry (buffer-substring-no-properties entry-start (point))))
       (setq diary-entry (diary-sexp-entry sexp entry date)
             literal entry               ; before evaluation