aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-10-17 16:16:27 +0000
committerRichard M. Stallman2005-10-17 16:16:27 +0000
commit75c0692f1b5c653aae409e629f3eac07e19d5947 (patch)
tree9accbd51fae43dc7564d48ea13e100fedecdc1ea
parentc4ac63d08568c20cbcbed7e07335829bb392bd2f (diff)
downloademacs-75c0692f1b5c653aae409e629f3eac07e19d5947.tar.gz
emacs-75c0692f1b5c653aae409e629f3eac07e19d5947.zip
(Sentinels): Clarify about output and quitting.
(Filter Functions): Mention with-local-quit.
-rw-r--r--lispref/processes.texi21
1 files changed, 14 insertions, 7 deletions
diff --git a/lispref/processes.texi b/lispref/processes.texi
index afdeaa1d2a0..d63ddc4aa3e 100644
--- a/lispref/processes.texi
+++ b/lispref/processes.texi
@@ -1096,9 +1096,10 @@ then free to do whatever it chooses with the output.
1096 1096
1097 Quitting is normally inhibited within a filter function---otherwise, 1097 Quitting is normally inhibited within a filter function---otherwise,
1098the effect of typing @kbd{C-g} at command level or to quit a user 1098the effect of typing @kbd{C-g} at command level or to quit a user
1099command would be unpredictable. If you want to permit quitting inside a 1099command would be unpredictable. If you want to permit quitting inside
1100filter function, bind @code{inhibit-quit} to @code{nil}. 1100a filter function, bind @code{inhibit-quit} to @code{nil}. In most
1101@xref{Quitting}. 1101cases, the right way to do this is with the macro
1102@code{with-local-quit}. @xref{Quitting}.
1102 1103
1103 If an error happens during execution of a filter function, it is 1104 If an error happens during execution of a filter function, it is
1104caught automatically, so that it doesn't stop the execution of whatever 1105caught automatically, so that it doesn't stop the execution of whatever
@@ -1375,16 +1376,22 @@ quick succession, can call the sentinel just once. However, process
1375termination will always run the sentinel exactly once. This is 1376termination will always run the sentinel exactly once. This is
1376because the process status can't change again after termination. 1377because the process status can't change again after termination.
1377 1378
1378 Quitting is normally inhibited within a sentinel---otherwise, the 1379 Emacs explicitly checks for output from the process before running
1379effect of typing @kbd{C-g} at command level or to quit a user command 1380the process sentinel. Once the sentinel runs due to process
1380would be unpredictable. If you want to permit quitting inside a 1381termination, no further output can arrive from the process.
1381sentinel, bind @code{inhibit-quit} to @code{nil}. @xref{Quitting}.
1382 1382
1383 A sentinel that writes the output into the buffer of the process 1383 A sentinel that writes the output into the buffer of the process
1384should check whether the buffer is still alive. If it tries to insert 1384should check whether the buffer is still alive. If it tries to insert
1385into a dead buffer, it will get an error. If the buffer is dead, 1385into a dead buffer, it will get an error. If the buffer is dead,
1386@code{(buffer-name (process-buffer @var{process}))} returns @code{nil}. 1386@code{(buffer-name (process-buffer @var{process}))} returns @code{nil}.
1387 1387
1388 Quitting is normally inhibited within a sentinel---otherwise, the
1389effect of typing @kbd{C-g} at command level or to quit a user command
1390would be unpredictable. If you want to permit quitting inside a
1391sentinel, bind @code{inhibit-quit} to @code{nil}. In most cases, the
1392right way to do this is with the macro @code{with-local-quit}.
1393@xref{Quitting}.
1394
1388 If an error happens during execution of a sentinel, it is caught 1395 If an error happens during execution of a sentinel, it is caught
1389automatically, so that it doesn't stop the execution of whatever 1396automatically, so that it doesn't stop the execution of whatever
1390programs was running when the sentinel was started. However, if 1397programs was running when the sentinel was started. However, if