diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2006-08-25 02:58:08 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2006-08-25 02:58:08 +0000 |
commit | fda9748457d804a6e46ebc7054f0976aed516e71 (patch) | |
tree | 8365c4fc51b0b1b19f83a4d3f10eee818491e28b /lispref/os.texi | |
parent | 6c5d6b6ce728bd25f6e72bfe8124059d6ded0744 (diff) |
* os.texi (Timers): Avoid waiting inside timers.
Diffstat (limited to 'lispref/os.texi')
-rw-r--r-- | lispref/os.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lispref/os.texi b/lispref/os.texi index d227cf92bc..b5522dc2a9 100644 --- a/lispref/os.texi +++ b/lispref/os.texi @@ -1394,6 +1394,13 @@ both before and after changing the buffer, to separate the timer's changes from user commands' changes and prevent a single undo entry from growing to be quite large. + Timer functions should also avoid calling functions that cause Emacs +to wait, such as @code{sit-for} (@pxref{Waiting}). This can lead to +unpredictable effects, since other timers (or even the same timer) can +run while waiting. If a timer function needs to perform an action +after a certain time has elapsed, it can do this by scheduling a new +timer. + If a timer function calls functions that can change the match data, it should save and restore the match data. @xref{Saving Match Data}. |