summaryrefslogtreecommitdiff
path: root/lispref/os.texi
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-09-25 15:20:44 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-09-25 15:20:44 +0000
commit2d56beeda61a7ed6551d889119040310c5658695 (patch)
treebfcb3411da1a1e1090381f40087dd21283ade9b5 /lispref/os.texi
parent94019f61df9c9d3fcdc9c2bf2b88c7d31b1f21ca (diff)
downloademacs-2d56beeda61a7ed6551d889119040310c5658695.tar.gz
* os.texi (Timers): Mention with-local-quit.
Diffstat (limited to 'lispref/os.texi')
-rw-r--r--lispref/os.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/lispref/os.texi b/lispref/os.texi
index 6c2d660709e..65cb0b906af 100644
--- a/lispref/os.texi
+++ b/lispref/os.texi
@@ -1386,7 +1386,12 @@ 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 call a function that takes substantial time to run is likely
-to be annoying.
+to be annoying. If a timer function needs to allow quitting, it
+should use @code{with-local-quit} (@pxref{Quitting}). For example, if
+a timer function calls @code{accept-process-output} to receive output
+from an external process, that call should be wrapped inside
+@code{with-local-quit}, to ensure that @kbd{C-g} works if the external
+process hangs.
It is usually a bad idea for timer functions to alter buffer
contents. When they do, they usually should call @code{undo-boundary}