diff options
| author | Richard M. Stallman | 2003-04-21 01:38:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-04-21 01:38:24 +0000 |
| commit | d64f1a9db66cfb37974cbbdfc8c6699d5f886a2f (patch) | |
| tree | 81594a07a31be7b43ec3e4ccd4992b24fdb4fa05 /lispref | |
| parent | 686ffe28aab7cf1b198dfc9e1ed85b717ff1ee35 (diff) | |
| download | emacs-d64f1a9db66cfb37974cbbdfc8c6699d5f886a2f.tar.gz emacs-d64f1a9db66cfb37974cbbdfc8c6699d5f886a2f.zip | |
(Timers): Explain about timers and quitting.
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/os.texi | 11 |
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. | |||
| 1275 | @section Timers for Delayed Execution | 1275 | @section Timers for Delayed Execution |
| 1276 | @cindex timer | 1276 | @cindex timer |
| 1277 | 1277 | ||
| 1278 | You can set up a @dfn{timer} to call a function at a specified future time or | 1278 | You can set up a @dfn{timer} to call a function at a specified |
| 1279 | after a certain length of idleness. | 1279 | future time or after a certain length of idleness. |
| 1280 | 1280 | ||
| 1281 | Emacs cannot run timers at any arbitrary point in a Lisp program; it | 1281 | Emacs cannot run timers at any arbitrary point in a Lisp program; it |
| 1282 | can run them only when Emacs could accept output from a subprocess: | 1282 | 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 | |||
| 1285 | timer's execution may be delayed if Emacs is busy. However, the time of | 1285 | timer's execution may be delayed if Emacs is busy. However, the time of |
| 1286 | execution is very precise if Emacs is idle. | 1286 | execution is very precise if Emacs is idle. |
| 1287 | 1287 | ||
| 1288 | Emacs binds @code{inhibit-quit} to @code{t} before calling the timer | ||
| 1289 | function, because quitting out of many timer functions can leave | ||
| 1290 | things in an inconsistent state. This is normally unproblematical | ||
| 1291 | because most timer functions don't do a lot of work. Indeed, for a | ||
| 1292 | timer to calls a function that takes substantial time to run is likely | ||
| 1293 | to be annoying. | ||
| 1294 | |||
| 1288 | @defun run-at-time time repeat function &rest args | 1295 | @defun run-at-time time repeat function &rest args |
| 1289 | This function arranges to call @var{function} with arguments @var{args} | 1296 | This function arranges to call @var{function} with arguments @var{args} |
| 1290 | at time @var{time}. The argument @var{function} is a function to call | 1297 | at time @var{time}. The argument @var{function} is a function to call |