Variable: ruler-mode-hook
ruler-mode-hook is a customizable variable defined in
ruler-mode.el.gz.
Value
nil
Documentation
Hook run after entering or leaving ruler-mode(var)/ruler-mode(fun).
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/ruler-mode.el.gz
;;;###autoload
(define-minor-mode ruler-mode
"Toggle display of ruler in header line (Ruler mode)."
:group 'ruler-mode
:variable (ruler-mode
. (lambda (enable)
(when enable
(ruler--save-header-line-format))
(setq ruler-mode enable)))
(if ruler-mode
(add-hook 'post-command-hook 'force-mode-line-update nil t)
;; When `ruler-mode' is off restore previous header line format if
;; the current one is the ruler header line format.
(when (eq header-line-format ruler-mode-header-line-format)
(kill-local-variable 'header-line-format)
(when (local-variable-p 'ruler-mode-header-line-format-old)
(setq header-line-format ruler-mode-header-line-format-old)
(kill-local-variable 'ruler-mode-header-line-format-old)))
(remove-hook 'post-command-hook 'force-mode-line-update t)))