Function: savehist--manage-timer
savehist--manage-timer is a byte-compiled function defined in
savehist.el.gz.
Signature
(savehist--manage-timer)
Documentation
Set or cancel an invocation of savehist-autosave on a timer.
If savehist-mode(var)/savehist-mode(fun) is enabled, set the timer, otherwise cancel the timer.
This should not cause noticeable delays for users -- savehist-autosave
executes in under 5 ms on my system.
Source Code
;; Defined in /usr/src/emacs/lisp/savehist.el.gz
(defun savehist--manage-timer ()
"Set or cancel an invocation of `savehist-autosave' on a timer.
If `savehist-mode' is enabled, set the timer, otherwise cancel the timer.
This should not cause noticeable delays for users -- `savehist-autosave'
executes in under 5 ms on my system."
(if (and savehist-mode
savehist-autosave-interval
(null savehist-timer))
(setq savehist-timer
(run-with-timer savehist-autosave-interval
savehist-autosave-interval #'savehist-autosave))
(savehist--cancel-timer)))