Variable: midnight-mode
midnight-mode is a customizable variable defined in midnight.el.gz.
Value
nil
Documentation
Non-nil if Midnight mode is enabled.
See the midnight-mode(var)/midnight-mode(fun) command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node (emacs)Easy Customization)
or call the function midnight-mode(var)/midnight-mode(fun).
Probably introduced at or before Emacs version 20.3.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/midnight.el.gz
;;;###autoload
(define-minor-mode midnight-mode
"Non-nil means run `midnight-hook' at midnight."
:global t
:initialize #'custom-initialize-default
;; Disable first, since the ':initialize' function above already
;; starts the timer when the mode is turned on for the first time,
;; via setting 'midnight-delay', which calls 'midnight-delay-set',
;; which starts the timer.
(when (timerp midnight-timer) (cancel-timer midnight-timer))
(if midnight-mode (timer-activate midnight-timer)))