aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-03-27 02:47:50 +0000
committerGlenn Morris2007-03-27 02:47:50 +0000
commit851971c72e4b9c26958d6c87dff62ea4320644eb (patch)
treeaefb9c11f4e6ab0cf4f83146ef5cec5644da6b90
parent7465af6028521c394109183678568cbb33ccad7e (diff)
downloademacs-851971c72e4b9c26958d6c87dff62ea4320644eb.tar.gz
emacs-851971c72e4b9c26958d6c87dff62ea4320644eb.zip
(diary-live-p): Do not check for diary-selective-display.
-rw-r--r--lisp/calendar/diary-lib.el22
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 72620a7f9bb..a128e50a0fb 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -292,16 +292,22 @@ Only used if `diary-header-line-flag' is non-nil."
292 292
293(defvar diary-saved-point) ; internal 293(defvar diary-saved-point) ; internal
294 294
295;; The first version of this also checked for diary-selective-display
296;; in the non-fancy case. This was an attempt to distinguish between
297;; displaying the diary and just visiting the diary file. However,
298;; when using fancy diary, calling diary when there are no entries to
299;; display does not create the fancy buffer, nor does it switch on
300;; selective-display in the diary buffer. This means some
301;; customizations will not take effect, eg:
302;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00466.html
303;; So the check for selective-display was dropped. This means the
304;; diary will be displayed if one customizes a diary variable while
305;; just visiting the diary-file. This is i) unlikely, and ii) no great loss.
295(defun diary-live-p () 306(defun diary-live-p ()
296 "Return non-nil if the diary is being displayed. 307 "Return non-nil if the diary is being displayed."
297This is not the same as just visiting the `diary-file'."
298 (or (get-buffer fancy-diary-buffer) 308 (or (get-buffer fancy-diary-buffer)
299 (when diary-file 309 (and diary-file
300 (let ((dbuff (find-buffer-visiting 310 (find-buffer-visiting (substitute-in-file-name diary-file)))))
301 (substitute-in-file-name diary-file))))
302 (when dbuff
303 (with-current-buffer dbuff
304 diary-selective-display))))))
305 311
306(defun diary-set-maybe-redraw (symbol value) 312(defun diary-set-maybe-redraw (symbol value)
307 "Set SYMBOL's value to VALUE, and redraw the diary if necessary. 313 "Set SYMBOL's value to VALUE, and redraw the diary if necessary.