diff options
| author | Juanma Barranquero | 2002-11-14 14:09:41 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2002-11-14 14:09:41 +0000 |
| commit | b8f2671f3560a413ab1fdbee369e78a17b4cc76f (patch) | |
| tree | 7ac48c7e756edfe4a854534d0635cb00ace37627 | |
| parent | a8c4aa2e41490ba6d74ae5b65997097022cc31b1 (diff) | |
| download | emacs-b8f2671f3560a413ab1fdbee369e78a17b4cc76f.tar.gz emacs-b8f2671f3560a413ab1fdbee369e78a17b4cc76f.zip | |
calendar/diary-lib.el (make-diary-entry): Allow for local variables at end of
diary file.
| -rw-r--r-- | lisp/calendar/diary-lib.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 2d16fe515ef..0b058a3bdfa 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1457,7 +1457,15 @@ Do nothing if DATE or STRING is nil." | |||
| 1457 | If omitted, NONMARKING defaults to nil and FILE defaults to diary-file." | 1457 | If omitted, NONMARKING defaults to nil and FILE defaults to diary-file." |
| 1458 | (find-file-other-window | 1458 | (find-file-other-window |
| 1459 | (substitute-in-file-name (if file file diary-file))) | 1459 | (substitute-in-file-name (if file file diary-file))) |
| 1460 | (widen) | ||
| 1460 | (goto-char (point-max)) | 1461 | (goto-char (point-max)) |
| 1462 | (when (let ((case-fold-search t)) | ||
| 1463 | (search-backward "Local Variables:" | ||
| 1464 | (max (- (point-max) 3000) (point-min)) | ||
| 1465 | t)) | ||
| 1466 | (beginning-of-line) | ||
| 1467 | (insert "\n") | ||
| 1468 | (previous-line 1)) | ||
| 1461 | (insert | 1469 | (insert |
| 1462 | (if (bolp) "" "\n") | 1470 | (if (bolp) "" "\n") |
| 1463 | (if nonmarking diary-nonmarking-symbol "") | 1471 | (if nonmarking diary-nonmarking-symbol "") |