summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-11-09 09:06:52 +0000
committerRichard M. Stallman <rms@gnu.org>1996-11-09 09:06:52 +0000
commite5aa61607e6922a5fa8b5a9d9050ec4f80aa2e21 (patch)
tree9470b88e1103211e56f19d277fdbf3d36477e22e /lisp/calendar
parentade7a9a4c1aa62d3acc466d4e5b9361345fdd91c (diff)
downloademacs-e5aa61607e6922a5fa8b5a9d9050ec4f80aa2e21.tar.gz
(list-diary-entries): Reread the diary file if it has changed.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/diary-lib.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 175568264a3..875cc2ae840 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -239,9 +239,11 @@ These hooks have the following distinct roles:
(message "Preparing diary...")
(save-excursion
(let ((diary-buffer (find-buffer-visiting d-file)))
- (set-buffer (if diary-buffer
- diary-buffer
- (find-file-noselect d-file t))))
+ (if (not diary-buffer)
+ (set-buffer (find-file-noselect d-file t))
+ (set-buffer diary-buffer)
+ (or (verify-visited-file-modtime diary-buffer)
+ (revert-buffer t t))))
(setq selective-display t)
(setq selective-display-ellipses nil)
(setq old-diary-syntax-table (syntax-table))