From: Richard M. Stallman Date: Mon, 21 Apr 2003 01:38:24 +0000 (+0000) Subject: (Timers): Explain about timers and quitting. X-Git-Tag: ttn-vms-21-2-B4~10458 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d64f1a9db66cfb37974cbbdfc8c6699d5f886a2f;p=emacs.git (Timers): Explain about timers and quitting. --- diff --git a/lispref/os.texi b/lispref/os.texi index 1defdcdbe57..25a925ded6d 100644 --- a/lispref/os.texi +++ b/lispref/os.texi @@ -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