Commit b8f2671f authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

calendar/diary-lib.el (make-diary-entry): Allow for local variables at end of

diary file.
parent a8c4aa2e
......@@ -1457,7 +1457,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 "")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment