:group 'diary
:type 'boolean
:initialize 'custom-initialize-default
+ ;; FIXME overkill.
:set 'diary-set-maybe-redraw
:version "22.1")
Only used if `diary-header-line-flag' is non-nil."
:group 'diary
:type 'sexp
+ :initialize 'custom-initialize-default
+ ;; FIXME overkill.
+ :set 'diary-set-maybe-redraw
:version "22.1")
(defvar diary-saved-point) ; internal
(or (verify-visited-file-modtime diary-buffer)
(revert-buffer t t))))
;; Setup things like the header-line-format and invisibility-spec.
- ;; This used to only run if the major-mode was default-major-mode,
- ;; but that meant eg changes to header-line-format did not
- ;; take effect from one diary invocation to the next.
- (diary-mode)
+ (if (eq major-mode default-major-mode)
+ (diary-mode)
+ ;; This kludge is to make customizations to
+ ;; diary-header-line-flag after diary has been displayed
+ ;; take effect. Unconditionally calling (diary-mode)
+ ;; 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)))
;; d-s-p is passed to the diary display function.
(let ((diary-saved-point (point)))
(save-excursion