Commit 253b50b4 authored by Glenn Morris's avatar Glenn Morris
Browse files

(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.
parent a26a08f2
......@@ -276,6 +276,7 @@ The format of the header is specified by `diary-header-line-format'."
:group 'diary
:type 'boolean
:initialize 'custom-initialize-default
;; FIXME overkill.
:set 'diary-set-maybe-redraw
:version "22.1")
......@@ -292,6 +293,9 @@ before edit/copy"
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
......@@ -434,10 +438,16 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list."
(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.
(if (eq major-mode default-major-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.
(setq header-line-format (and diary-header-line-flag
;; d-s-p is passed to the diary display function.
(let ((diary-saved-point (point)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment