Variable: diary-mode-hook

diary-mode-hook is a variable defined in diary-lib.el.gz.

Value

nil

Documentation

Hook run after entering diary-mode.

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
;;;###autoload
(define-derived-mode diary-mode fundamental-mode "Diary"
  "Major mode for editing the diary file."
  (setq-local font-lock-defaults '(diary-font-lock-keywords t))
  (setq-local comment-start diary-comment-start)
  (setq-local comment-end diary-comment-end)
  (add-to-invisibility-spec '(diary . nil))
  (add-hook 'after-save-hook #'diary-redraw-calendar nil t)
  ;; In case the file was modified externally, refresh the calendar
  ;; after refreshing the diary buffer.
  (add-hook 'after-revert-hook #'diary-redraw-calendar nil t)
  (if diary-header-line-flag
      (setq header-line-format diary-header-line-format)))