]> git.eshelyaron.com Git - emacs.git/commitdiff
(make-diary-entry): Allow for local variables at end of diary file.
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 18 Nov 2002 07:31:30 +0000 (07:31 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 18 Nov 2002 07:31:30 +0000 (07:31 +0000)
lisp/ChangeLog
lisp/calendar/diary-lib.el

index c871ee9b5860d3716cc19696e5bf0330cd727058..07cf0e2f672c3b098a47ae8f81262b9ae5828105 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-16  Edward M. Reingold  <reingold@emr.cs.iit.edu>
+
+       * calendar/diary-lib.el (make-diary-entry): Allow for local variables
+       at end of diary file.
+
 2002-11-16  Ivan Zakharyaschev <imz@altlinux.org>  (tiny change)
 
        * international/codepage.el (cp866-decode-table): Fix the
index 9322f5987fa1fc2207b7d32da592d0f121c23947..90cfec67d3dc1a98d4586cc5bd6e80aaa22e0720 100644 (file)
@@ -1436,7 +1436,15 @@ Do nothing if DATE or STRING is nil."
 If omitted, NONMARKING defaults to nil and FILE defaults to diary-file."
   (find-file-other-window
    (substitute-in-file-name (if file file diary-file)))
+  (widen)
   (goto-char (point-max))
+  (when (let ((case-fold-search t))
+          (search-backward "Local Variables:"
+                           (max (- (point-max) 3000) (point-min))
+                           t))
+    (beginning-of-line)
+    (insert "\n")
+    (previous-line 1))
   (insert
    (if (bolp) "" "\n")
    (if nonmarking diary-nonmarking-symbol "")