summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2003-04-21 01:38:24 +0000
committerRichard M. Stallman <rms@gnu.org>2003-04-21 01:38:24 +0000
commitd64f1a9db66cfb37974cbbdfc8c6699d5f886a2f (patch)
tree81594a07a31be7b43ec3e4ccd4992b24fdb4fa05
parent686ffe28aab7cf1b198dfc9e1ed85b717ff1ee35 (diff)
downloademacs-d64f1a9db66cfb37974cbbdfc8c6699d5f886a2f.tar.gz
(Timers): Explain about timers and quitting.
-rw-r--r--lispref/os.texi11
1 files changed, 9 insertions, 2 deletions
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