# HG changeset patch # User Richard M. Stallman # Date 1050889104 0 # Node ID 07caa9606def5912d81938e56c89355e3b07e06a # Parent 6f6abeeda7ed668403a7b40a708b49345a931f38 (Timers): Explain about timers and quitting. diff -r 6f6abeeda7ed -r 07caa9606def lispref/os.texi --- a/lispref/os.texi Mon Apr 21 01:37:37 2003 +0000 +++ b/lispref/os.texi Mon Apr 21 01:38:24 2003 +0000 @@ -1275,8 +1275,8 @@ @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 @@ 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