diff options
| author | Richard M. Stallman | 2006-08-20 12:16:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-08-20 12:16:26 +0000 |
| commit | 171d328e8dd84e6d9e8d168e4e91fe989b65b138 (patch) | |
| tree | da17925152eab20487aad11e725b874488b667ae | |
| parent | 4721317c7d11c24f2bac4fb20bba6e8750eb91b8 (diff) | |
| download | emacs-171d328e8dd84e6d9e8d168e4e91fe989b65b138.tar.gz emacs-171d328e8dd84e6d9e8d168e4e91fe989b65b138.zip | |
(run-with-idle-timer): Pass t to timer-activate-when-idle, so timer
can run before Emacs becomes non-idle again.
| -rw-r--r-- | lisp/emacs-lisp/timer.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index a98dd60fc21..ed85bc765f7 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'." | |||
| 413 | "Perform an action the next time Emacs is idle for SECS seconds. | 413 | "Perform an action the next time Emacs is idle for SECS seconds. |
| 414 | The action is to call FUNCTION with arguments ARGS. | 414 | The action is to call FUNCTION with arguments ARGS. |
| 415 | SECS may be an integer or a floating point number. | 415 | SECS may be an integer or a floating point number. |
| 416 | If Emacs is currently idle, and has been idle for N seconds (N < SECS), | ||
| 417 | then it will call FUNCTION in SECS - N seconds from now. | ||
| 416 | 418 | ||
| 417 | If REPEAT is non-nil, do the action each time Emacs has been idle for | 419 | If REPEAT is non-nil, do the action each time Emacs has been idle for |
| 418 | exactly SECS seconds (that is, only once for each time Emacs becomes idle). | 420 | 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'." | |||
| 425 | (let ((timer (timer-create))) | 427 | (let ((timer (timer-create))) |
| 426 | (timer-set-function timer function args) | 428 | (timer-set-function timer function args) |
| 427 | (timer-set-idle-time timer secs repeat) | 429 | (timer-set-idle-time timer secs repeat) |
| 428 | (timer-activate-when-idle timer) | 430 | (timer-activate-when-idle timer t) |
| 429 | timer)) | 431 | timer)) |
| 430 | 432 | ||
| 431 | (defun with-timeout-handler (tag) | 433 | (defun with-timeout-handler (tag) |