changeset 50654:07caa9606def

(Timers): Explain about timers and quitting.
author Richard M. Stallman <rms@gnu.org>
date Mon, 21 Apr 2003 01:38:24 +0000
parents 6f6abeeda7ed
children 8e621ea67f06
files lispref/os.texi
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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