aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-02-24 13:47:36 +0000
committerGerd Moellmann2000-02-24 13:47:36 +0000
commitcb8325bf5268a8feaca46f0ac62f0331f72027ca (patch)
tree4dc0b0449a3ec5e72ba6cb5c00b38054008fa865
parentd066de8eb4967cd6c150870d40ef6e777d617e3b (diff)
downloademacs-cb8325bf5268a8feaca46f0ac62f0331f72027ca.tar.gz
emacs-cb8325bf5268a8feaca46f0ac62f0331f72027ca.zip
(include-other-diary-files): Undo the selective
display in any included file and don't kill it.
-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 e45a81aa868..c8d88a2549d 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -363,20 +363,28 @@ changing the variable `diary-include-string'."
363 (regexp-quote diary-include-string) 363 (regexp-quote diary-include-string)
364 " \"\\([^\"]*\\)\"") 364 " \"\\([^\"]*\\)\"")
365 nil t) 365 nil t)
366 (let ((diary-file (substitute-in-file-name 366 (let* ((diary-file (substitute-in-file-name
367 (buffer-substring-no-properties 367 (buffer-substring-no-properties
368 (match-beginning 2) (match-end 2)))) 368 (match-beginning 2) (match-end 2))))
369 (diary-list-include-blanks nil) 369 (diary-list-include-blanks nil)
370 (list-diary-entries-hook 'include-other-diary-files) 370 (list-diary-entries-hook 'include-other-diary-files)
371 (diary-display-hook 'ignore) 371 (diary-display-hook 'ignore)
372 (diary-hook nil)) 372 (diary-hook nil)
373 (d-buffer (find-buffer-visiting diary-file))
374 (diary-modified (if d-buffer
375 (save-excursion
376 (set-buffer d-buffer)
377 (buffer-modified-p)))))
373 (if (file-exists-p diary-file) 378 (if (file-exists-p diary-file)
374 (if (file-readable-p diary-file) 379 (if (file-readable-p diary-file)
375 (unwind-protect 380 (unwind-protect
376 (setq diary-entries-list 381 (setq diary-entries-list
377 (append diary-entries-list 382 (append diary-entries-list
378 (list-diary-entries original-date number))) 383 (list-diary-entries original-date number)))
379 (kill-buffer (find-buffer-visiting diary-file))) 384 (set-buffer (find-buffer-visiting diary-file))
385 (subst-char-in-region (point-min) (point-max) ?\^M ?\n t)
386 (setq selective-display nil)
387 (set-buffer-modified-p diary-modified))
380 (beep) 388 (beep)
381 (message "Can't read included diary file %s" diary-file) 389 (message "Can't read included diary file %s" diary-file)
382 (sleep-for 2)) 390 (sleep-for 2))