1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 19:10:37 -08:00

(Timers): Explain about timers and quitting.

This commit is contained in:
Richard M. Stallman 2003-04-21 01:38:24 +00:00
parent 686ffe28aa
commit d64f1a9db6

View file

@ -1275,8 +1275,8 @@ This function returns @code{t} if @var{year} is a leap year.
@section Timers for Delayed Execution
@cindex timer
You can set up a @dfn{timer} to call a function at a specified future time or
after a certain length of idleness.
You can set up a @dfn{timer} to call a function at a specified
future time or after a certain length of idleness.
Emacs cannot run timers at any arbitrary point in a Lisp program; it
can run them only when Emacs could accept output from a subprocess:
@ -1285,6 +1285,13 @@ namely, while waiting or inside certain primitive functions such as
timer's execution may be delayed if Emacs is busy. However, the time of
execution is very precise if Emacs is idle.
Emacs binds @code{inhibit-quit} to @code{t} before calling the timer
function, because quitting out of many timer functions can leave
things in an inconsistent state. This is normally unproblematical
because most timer functions don't do a lot of work. Indeed, for a
timer to calls a function that takes substantial time to run is likely
to be annoying.
@defun run-at-time time repeat function &rest args
This function arranges to call @var{function} with arguments @var{args}
at time @var{time}. The argument @var{function} is a function to call