changeset 111928:89658283a80c

diary-lib fix for bug#7536. * lisp/calendar/diary-lib.el (diary-list-sexp-entries): Handle case of no newline at end of file.
author Glenn Morris <rgm@gnu.org>
date Wed, 08 Dec 2010 17:50:08 -0800
parents f2a4e55e19ea
children c8a80ac35b9a
files lisp/ChangeLog lisp/calendar/diary-lib.el
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Dec 08 17:46:03 2010 -0800
+++ b/lisp/ChangeLog	Wed Dec 08 17:50:08 2010 -0800
@@ -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.
--- a/lisp/calendar/diary-lib.el	Wed Dec 08 17:46:03 2010 -0800
+++ b/lisp/calendar/diary-lib.el	Wed Dec 08 17:50:08 2010 -0800
@@ -1744,7 +1744,7 @@
         (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