Function: midnight-delay-set

midnight-delay-set is an autoloaded and byte-compiled function defined in midnight.el.gz.

Signature

(midnight-delay-set SYMB TM)

Documentation

Modify midnight-timer according to midnight-delay.

Sets the first argument SYMB (which must be symbol midnight-delay) to its second argument TM.

Source Code

;; Defined in /usr/src/emacs/lisp/midnight.el.gz
;;;###autoload
(defun midnight-delay-set (symb tm)
  "Modify `midnight-timer' according to `midnight-delay'.
Sets the first argument SYMB (which must be symbol `midnight-delay')
to its second argument TM."
  (cl-assert (eq symb 'midnight-delay) t
             "Invalid argument to `midnight-delay-set': `%s'")
  (set symb tm)
  (when (timerp midnight-timer) (cancel-timer midnight-timer))
  (setq midnight-timer
        (run-at-time (if (numberp tm) (+ (midnight-next) tm) tm)
                     midnight-period #'run-hooks 'midnight-hook)))