emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v
Date: Tue, 27 Mar 2007 02:47:51 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/03/27 02:47:50

Index: diary-lib.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/diary-lib.el,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -b -r1.121 -r1.122
--- diary-lib.el        21 Mar 2007 06:24:59 -0000      1.121
+++ diary-lib.el        27 Mar 2007 02:47:50 -0000      1.122
@@ -292,16 +292,22 @@
 
 (defvar diary-saved-point)             ; internal
 
+;; The first version of this also checked for diary-selective-display
+;; in the non-fancy case. This was an attempt to distinguish between
+;; displaying the diary and just visiting the diary file. However,
+;; when using fancy diary, calling diary when there are no entries to
+;; display does not create the fancy buffer, nor does it switch on
+;; selective-display in the diary buffer. This means some
+;; customizations will not take effect, eg:
+;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00466.html
+;; So the check for selective-display was dropped. This means the
+;; diary will be displayed if one customizes a diary variable while
+;; just visiting the diary-file. This is i) unlikely, and ii) no great loss.
 (defun diary-live-p ()
-  "Return non-nil if the diary is being displayed.
-This is not the same as just visiting the `diary-file'."
+  "Return non-nil if the diary is being displayed."
   (or (get-buffer fancy-diary-buffer)
-      (when diary-file
-        (let ((dbuff (find-buffer-visiting
-                      (substitute-in-file-name diary-file))))
-          (when dbuff
-            (with-current-buffer dbuff
-              diary-selective-display))))))
+      (and diary-file
+           (find-buffer-visiting (substitute-in-file-name diary-file)))))
 
 (defun diary-set-maybe-redraw (symbol value)
   "Set SYMBOL's value to VALUE, and redraw the diary if necessary.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]