aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-02-24 13:47:36 +0000
committerGerd Moellmann <[email protected]>2000-02-24 13:47:36 +0000
commitcb8325bf5268a8feaca46f0ac62f0331f72027ca (patch)
tree4dc0b0449a3ec5e72ba6cb5c00b38054008fa865 /lisp
parentd066de8eb4967cd6c150870d40ef6e777d617e3b (diff)
(include-other-diary-files): Undo the selective
display in any included file and don't kill it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/calendar/diary-lib.el24
1 files changed, 16 insertions, 8 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index e45a81aa86..c8d88a2549 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -363,20 +363,28 @@ changing the variable `diary-include-string'."
(regexp-quote diary-include-string)
" \"\\([^\"]*\\)\"")
nil t)
- (let ((diary-file (substitute-in-file-name
- (buffer-substring-no-properties
- (match-beginning 2) (match-end 2))))
- (diary-list-include-blanks nil)
- (list-diary-entries-hook 'include-other-diary-files)
- (diary-display-hook 'ignore)
- (diary-hook nil))
+ (let* ((diary-file (substitute-in-file-name
+ (buffer-substring-no-properties
+ (match-beginning 2) (match-end 2))))
+ (diary-list-include-blanks nil)
+ (list-diary-entries-hook 'include-other-diary-files)
+ (diary-display-hook 'ignore)
+ (diary-hook nil)
+ (d-buffer (find-buffer-visiting diary-file))
+ (diary-modified (if d-buffer
+ (save-excursion
+ (set-buffer d-buffer)
+ (buffer-modified-p)))))
(if (file-exists-p diary-file)
(if (file-readable-p diary-file)
(unwind-protect
(setq diary-entries-list
(append diary-entries-list
(list-diary-entries original-date number)))
- (kill-buffer (find-buffer-visiting diary-file)))
+ (set-buffer (find-buffer-visiting diary-file))
+ (subst-char-in-region (point-min) (point-max) ?\^M ?\n t)
+ (setq selective-display nil)
+ (set-buffer-modified-p diary-modified))
(beep)
(message "Can't read included diary file %s" diary-file)
(sleep-for 2))