diff options
| author | Richard M. Stallman | 2005-10-17 16:16:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-10-17 16:16:27 +0000 |
| commit | 75c0692f1b5c653aae409e629f3eac07e19d5947 (patch) | |
| tree | 9accbd51fae43dc7564d48ea13e100fedecdc1ea | |
| parent | c4ac63d08568c20cbcbed7e07335829bb392bd2f (diff) | |
| download | emacs-75c0692f1b5c653aae409e629f3eac07e19d5947.tar.gz emacs-75c0692f1b5c653aae409e629f3eac07e19d5947.zip | |
(Sentinels): Clarify about output and quitting.
(Filter Functions): Mention with-local-quit.
| -rw-r--r-- | lispref/processes.texi | 21 |
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, |
| 1098 | the effect of typing @kbd{C-g} at command level or to quit a user | 1098 | the effect of typing @kbd{C-g} at command level or to quit a user |
| 1099 | command would be unpredictable. If you want to permit quitting inside a | 1099 | command would be unpredictable. If you want to permit quitting inside |
| 1100 | filter function, bind @code{inhibit-quit} to @code{nil}. | 1100 | a filter function, bind @code{inhibit-quit} to @code{nil}. In most |
| 1101 | @xref{Quitting}. | 1101 | cases, 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 |
| 1104 | caught automatically, so that it doesn't stop the execution of whatever | 1105 | caught 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 | |||
| 1375 | termination will always run the sentinel exactly once. This is | 1376 | termination will always run the sentinel exactly once. This is |
| 1376 | because the process status can't change again after termination. | 1377 | because 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 |
| 1379 | effect of typing @kbd{C-g} at command level or to quit a user command | 1380 | the process sentinel. Once the sentinel runs due to process |
| 1380 | would be unpredictable. If you want to permit quitting inside a | 1381 | termination, no further output can arrive from the process. |
| 1381 | sentinel, 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 |
| 1384 | should check whether the buffer is still alive. If it tries to insert | 1384 | should check whether the buffer is still alive. If it tries to insert |
| 1385 | into a dead buffer, it will get an error. If the buffer is dead, | 1385 | into 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 | ||
| 1389 | effect of typing @kbd{C-g} at command level or to quit a user command | ||
| 1390 | would be unpredictable. If you want to permit quitting inside a | ||
| 1391 | sentinel, bind @code{inhibit-quit} to @code{nil}. In most cases, the | ||
| 1392 | right 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 |
| 1389 | automatically, so that it doesn't stop the execution of whatever | 1396 | automatically, so that it doesn't stop the execution of whatever |
| 1390 | programs was running when the sentinel was started. However, if | 1397 | programs was running when the sentinel was started. However, if |