]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve previous fix by only setting header-line-format in diary-mode.
authorGlenn Morris <rgm@gnu.org>
Wed, 18 Apr 2007 06:44:01 +0000 (06:44 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 18 Apr 2007 06:44:01 +0000 (06:44 +0000)
lisp/ChangeLog
lisp/calendar/diary-lib.el

index fea6a86e8e57cad36fa8322dda1276def0e6ecae..0f562a8aad1e40ca150164fe161ddaecf5b0c0d4 100644 (file)
@@ -3,8 +3,8 @@
        * calendar/diary-lib.el (diary-header-line-format): Add a custom
        :set function.
        (diary-list-entries): Only switch to diary-mode from
-       default-major-mode (reverts 2007-03-21 change).  Otherwise, set
-       header-line-format, in case of any customization.
+       default-major-mode (reverts 2007-03-21 change).  Otherwise, if in
+       diary-mode set header-line-format, in case of any customization.
 
 2007-04-18  Levin Du  <zslevin@gmail.com>  (tiny change)
 
index 5838851246f7f464714eeecf044d6c3dcc29a5c1..ee93b60eb98c73ee772d1f8f9e9ff30f48687d03 100644 (file)
@@ -446,8 +446,9 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list."
           ;; clobbers file local variables.
           ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00363.html
           ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00404.html
-          (setq header-line-format (and diary-header-line-flag
-                                        diary-header-line-format)))
+          (if (eq major-mode 'diary-mode)
+              (setq header-line-format (and diary-header-line-flag
+                                            diary-header-line-format))))
         ;; d-s-p is passed to the diary display function.
         (let ((diary-saved-point (point)))
           (save-excursion