diff options
| author | Edward M. Reingold | 1994-07-06 20:26:53 +0000 |
|---|---|---|
| committer | Edward M. Reingold | 1994-07-06 20:26:53 +0000 |
| commit | f26bb3034e825425838524b046eec513a0d20e17 (patch) | |
| tree | 6604d3eb6df9cda160b2776700ee0835ee7f8fe2 | |
| parent | f4136d9c7842bbcc52b4d2e78dd81d9b61984622 (diff) | |
| download | emacs-f26bb3034e825425838524b046eec513a0d20e17.tar.gz emacs-f26bb3034e825425838524b046eec513a0d20e17.zip | |
(fancy-dairy-display): Consistently turn off selective display in diary buffer
before doing anything.
| -rw-r--r-- | lisp/diary-lib.el | 16 |
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 @@ | |||
| 1 | ;;; diary.el --- diary functions. | 1 | ;;; diary-lib.el --- diary functions. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 1990, 1992, 1993, 1994 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1989, 1990, 1992, 1993, 1994 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -317,6 +317,13 @@ changing the variable `diary-include-string'." | |||
| 317 | (defun fancy-diary-display () | 317 | (defun fancy-diary-display () |
| 318 | "Prepare a diary buffer with relevant entries in a fancy, noneditable form. | 318 | "Prepare a diary buffer with relevant entries in a fancy, noneditable form. |
| 319 | This function is provided for optional use as the `diary-display-hook'." | 319 | This function is provided for optional use as the `diary-display-hook'." |
| 320 | (save-excursion;; Turn off selective-display in the diary file's buffer. | ||
| 321 | (set-buffer (get-file-buffer (substitute-in-file-name diary-file))) | ||
| 322 | (let ((diary-modified (buffer-modified-p))) | ||
| 323 | (subst-char-in-region (point-min) (point-max) ?\^M ?\n t) | ||
| 324 | (setq selective-display nil) | ||
| 325 | (kill-local-variable 'mode-line-format) | ||
| 326 | (set-buffer-modified-p diary-modified))) | ||
| 320 | (if (or (not diary-entries-list) | 327 | (if (or (not diary-entries-list) |
| 321 | (and (not (cdr diary-entries-list)) | 328 | (and (not (cdr diary-entries-list)) |
| 322 | (string-equal (car (cdr (car diary-entries-list))) ""))) | 329 | (string-equal (car (cdr (car diary-entries-list))) ""))) |
| @@ -337,13 +344,6 @@ This function is provided for optional use as the `diary-display-hook'." | |||
| 337 | (setq buffer-read-only t) | 344 | (setq buffer-read-only t) |
| 338 | (display-buffer holiday-buffer) | 345 | (display-buffer holiday-buffer) |
| 339 | (message "No diary entries for %s" date-string))) | 346 | (message "No diary entries for %s" date-string))) |
| 340 | (save-excursion;; Turn off selective-display in the diary file's buffer. | ||
| 341 | (set-buffer (get-file-buffer (substitute-in-file-name diary-file))) | ||
| 342 | (let ((diary-modified (buffer-modified-p))) | ||
| 343 | (subst-char-in-region (point-min) (point-max) ?\^M ?\n t) | ||
| 344 | (setq selective-display nil) | ||
| 345 | (kill-local-variable 'mode-line-format) | ||
| 346 | (set-buffer-modified-p diary-modified))) | ||
| 347 | (save-excursion;; Prepare the fancy diary buffer. | 347 | (save-excursion;; Prepare the fancy diary buffer. |
| 348 | (set-buffer (get-buffer-create fancy-diary-buffer)) | 348 | (set-buffer (get-buffer-create fancy-diary-buffer)) |
| 349 | (setq buffer-read-only nil) | 349 | (setq buffer-read-only nil) |