aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/timer.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2006-08-20 12:16:26 +0000
committerRichard M. Stallman <[email protected]>2006-08-20 12:16:26 +0000
commit171d328e8dd84e6d9e8d168e4e91fe989b65b138 (patch)
treeda17925152eab20487aad11e725b874488b667ae /lisp/emacs-lisp/timer.el
parent4721317c7d11c24f2bac4fb20bba6e8750eb91b8 (diff)
(run-with-idle-timer): Pass t to timer-activate-when-idle, so timer
can run before Emacs becomes non-idle again.
Diffstat (limited to 'lisp/emacs-lisp/timer.el')
-rw-r--r--lisp/emacs-lisp/timer.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index a98dd60fc2..ed85bc765f 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -413,6 +413,8 @@ This function is for compatibility; see also `run-with-timer'."
"Perform an action the next time Emacs is idle for SECS seconds.
The action is to call FUNCTION with arguments ARGS.
SECS may be an integer or a floating point number.
+If Emacs is currently idle, and has been idle for N seconds (N < SECS),
+then it will call FUNCTION in SECS - N seconds from now.
If REPEAT is non-nil, do the action each time Emacs has been idle for
exactly SECS seconds (that is, only once for each time Emacs becomes idle).
@@ -425,7 +427,7 @@ This function returns a timer object which you can use in `cancel-timer'."
(let ((timer (timer-create)))
(timer-set-function timer function args)
(timer-set-idle-time timer secs repeat)
- (timer-activate-when-idle timer)
+ (timer-activate-when-idle timer t)
timer))
(defun with-timeout-handler (tag)