aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/calendar/diary-lib.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 312b8841cf9..c8e6843d4b2 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1050,15 +1050,18 @@ changing the variable `diary-include-string'."
1050 (regexp-quote diary-include-string) 1050 (regexp-quote diary-include-string)
1051 " \"\\([^\"]*\\)\"") 1051 " \"\\([^\"]*\\)\"")
1052 nil t) 1052 nil t)
1053 (let ((diary-file (substitute-in-file-name 1053 (let* ((diary-file (substitute-in-file-name
1054 (buffer-substring-no-properties 1054 (match-string-no-properties 2)))
1055 (match-beginning 2) (match-end 2)))) 1055 (mark-diary-entries-hook 'mark-included-diary-files)
1056 (mark-diary-entries-hook 'mark-included-diary-files)) 1056 (dbuff (find-buffer-visiting diary-file)))
1057 ;; TODO if dbuff is non-nil, should we check for modifications
1058 ;; and offer to save it first?
1057 (if (file-exists-p diary-file) 1059 (if (file-exists-p diary-file)
1058 (if (file-readable-p diary-file) 1060 (if (file-readable-p diary-file)
1059 (progn 1061 (progn
1060 (mark-diary-entries) 1062 (mark-diary-entries)
1061 (kill-buffer (find-buffer-visiting diary-file))) 1063 (unless dbuff
1064 (kill-buffer (find-buffer-visiting diary-file))))
1062 (beep) 1065 (beep)
1063 (message "Can't read included diary file %s" diary-file) 1066 (message "Can't read included diary file %s" diary-file)
1064 (sleep-for 2)) 1067 (sleep-for 2))