summaryrefslogtreecommitdiff
path: root/lisp/=diary-lib.el
diff options
context:
space:
mode:
authorEdward M. Reingold <reingold@emr.cs.iit.edu>1994-07-06 20:26:53 +0000
committerEdward M. Reingold <reingold@emr.cs.iit.edu>1994-07-06 20:26:53 +0000
commite6a7187d96a23b4e206a12705aa7309d7fa502e4 (patch)
tree60dae246aca35328752aaf33823396618c1f4a27 /lisp/=diary-lib.el
parentf7aee2cc9d93432a282445466963ea3dc5590924 (diff)
downloademacs-e6a7187d96a23b4e206a12705aa7309d7fa502e4.tar.gz
(fancy-dairy-display): Consistently turn off selective display in diary buffer
before doing anything.
Diffstat (limited to 'lisp/=diary-lib.el')
-rw-r--r--lisp/=diary-lib.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/=diary-lib.el b/lisp/=diary-lib.el
index 177194e88e9..2a7b8edc468 100644
--- a/lisp/=diary-lib.el
+++ b/lisp/=diary-lib.el
@@ -1,4 +1,4 @@
-;;; diary.el --- diary functions.
+;;; diary-lib.el --- diary functions.
;; Copyright (C) 1989, 1990, 1992, 1993, 1994 Free Software Foundation, Inc.
@@ -317,6 +317,13 @@ changing the variable `diary-include-string'."
(defun fancy-diary-display ()
"Prepare a diary buffer with relevant entries in a fancy, noneditable form.
This function is provided for optional use as the `diary-display-hook'."
+ (save-excursion;; Turn off selective-display in the diary file's buffer.
+ (set-buffer (get-file-buffer (substitute-in-file-name diary-file)))
+ (let ((diary-modified (buffer-modified-p)))
+ (subst-char-in-region (point-min) (point-max) ?\^M ?\n t)
+ (setq selective-display nil)
+ (kill-local-variable 'mode-line-format)
+ (set-buffer-modified-p diary-modified)))
(if (or (not diary-entries-list)
(and (not (cdr diary-entries-list))
(string-equal (car (cdr (car diary-entries-list))) "")))
@@ -337,13 +344,6 @@ This function is provided for optional use as the `diary-display-hook'."
(setq buffer-read-only t)
(display-buffer holiday-buffer)
(message "No diary entries for %s" date-string)))
- (save-excursion;; Turn off selective-display in the diary file's buffer.
- (set-buffer (get-file-buffer (substitute-in-file-name diary-file)))
- (let ((diary-modified (buffer-modified-p)))
- (subst-char-in-region (point-min) (point-max) ?\^M ?\n t)
- (setq selective-display nil)
- (kill-local-variable 'mode-line-format)
- (set-buffer-modified-p diary-modified)))
(save-excursion;; Prepare the fancy diary buffer.
(set-buffer (get-buffer-create fancy-diary-buffer))
(setq buffer-read-only nil)