# HG changeset patch # User Richard M. Stallman # Date 1156076186 0 # Node ID 466083d03cb4beccde73f3dee185f94d386550cb # Parent 24e687976d39fbba837eb3f5d69584fef92c25f6 (run-with-idle-timer): Pass t to timer-activate-when-idle, so timer can run before Emacs becomes non-idle again. diff -r 24e687976d39 -r 466083d03cb4 lisp/emacs-lisp/timer.el --- a/lisp/emacs-lisp/timer.el Sun Aug 20 12:11:24 2006 +0000 +++ b/lisp/emacs-lisp/timer.el Sun Aug 20 12:16:26 2006 +0000 @@ -413,6 +413,8 @@ "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 @@ (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)