diff options
| author | Glenn Morris | 2014-02-21 00:04:15 -0800 |
|---|---|---|
| committer | Glenn Morris | 2014-02-21 00:04:15 -0800 |
| commit | 458e643be8acb837a8b002d8103e58c228976cd3 (patch) | |
| tree | 9529ba90d65449c9fe2a307ec3b66e959ca5f041 | |
| parent | 8dd3e94fb6b780ac2bf5d07795df376a296ef5b5 (diff) | |
| download | emacs-458e643be8acb837a8b002d8103e58c228976cd3.tar.gz emacs-458e643be8acb837a8b002d8103e58c228976cd3.zip | |
Some doc updates for default process sentinels and filters not being nil
* doc/lispref/internals.texi (Process Internals):
* doc/lispref/processes.texi (Deleting Processes, Output from Processes)
(Process Buffers, Filter Functions, Accepting Output, Sentinels)
(Network, Network Servers, Network Processes, Serial Ports):
Filters and sentinels can no longer be nil.
* doc/lispref/elisp.texi (Top): Menu update.
* doc/misc/flymake.texi (Starting the syntax check process): Grammar fix.
* doc/misc/tramp.texi (External packages): Grammar fix.
Reword for default sentinel not being nil any more.
* src/process.c (Fprocess_buffer, Faccept_process_output)
(Finternal_default_process_filter, Finternal_default_process_sentinel):
Doc fixes.
| -rw-r--r-- | doc/lispref/ChangeLog | 9 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 68 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/misc/flymake.texi | 4 | ||||
| -rw-r--r-- | doc/misc/tramp.texi | 10 | ||||
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/process.c | 32 |
9 files changed, 84 insertions, 60 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fcfb524934d..d6a996ca9bf 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2014-02-21 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * internals.texi (Process Internals): | ||
| 4 | * processes.texi (Deleting Processes, Output from Processes) | ||
| 5 | (Process Buffers, Filter Functions, Accepting Output, Sentinels) | ||
| 6 | (Network, Network Servers, Network Processes, Serial Ports): | ||
| 7 | Filters and sentinels can no longer be nil. | ||
| 8 | * elisp.texi (Top): Menu update. | ||
| 9 | |||
| 1 | 2014-02-20 Glenn Morris <rgm@gnu.org> | 10 | 2014-02-20 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * functions.texi (Defining Functions): Mention defalias-fset-function. | 12 | * functions.texi (Defining Functions): Mention defalias-fset-function. |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 0b2154cdb5e..b512968ff78 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -1305,7 +1305,7 @@ Processes | |||
| 1305 | 1305 | ||
| 1306 | Receiving Output from Processes | 1306 | Receiving Output from Processes |
| 1307 | 1307 | ||
| 1308 | * Process Buffers:: If no filter, output is put in a buffer. | 1308 | * Process Buffers:: By default, output is put in a buffer. |
| 1309 | * Filter Functions:: Filter functions accept output from the process. | 1309 | * Filter Functions:: Filter functions accept output from the process. |
| 1310 | * Decoding Output:: Filters can get unibyte or multibyte strings. | 1310 | * Decoding Output:: Filters can get unibyte or multibyte strings. |
| 1311 | * Accepting Output:: How to wait until process output arrives. | 1311 | * Accepting Output:: How to wait until process output arrives. |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 32fef454ac7..94e4b705105 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -1469,12 +1469,10 @@ process. For a network or serial process, it is @code{nil} if the | |||
| 1469 | process is running or @code{t} if the process is stopped. | 1469 | process is running or @code{t} if the process is stopped. |
| 1470 | 1470 | ||
| 1471 | @item filter | 1471 | @item filter |
| 1472 | If non-@code{nil}, a function used to accept output from the process | 1472 | A function used to accept output from the process. |
| 1473 | instead of a buffer. | ||
| 1474 | 1473 | ||
| 1475 | @item sentinel | 1474 | @item sentinel |
| 1476 | If non-@code{nil}, a function called whenever the state of the process | 1475 | A function called whenever the state of the process changes. |
| 1477 | changes. | ||
| 1478 | 1476 | ||
| 1479 | @item buffer | 1477 | @item buffer |
| 1480 | The associated buffer of the process. | 1478 | The associated buffer of the process. |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index c05f8ae8cb2..a564bd604c7 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -696,7 +696,7 @@ but not necessarily right away. You can delete a process explicitly | |||
| 696 | at any time. If you explicitly delete a terminated process before it | 696 | at any time. If you explicitly delete a terminated process before it |
| 697 | is deleted automatically, no harm results. Deleting a running | 697 | is deleted automatically, no harm results. Deleting a running |
| 698 | process sends a signal to terminate it (and its child processes, if | 698 | process sends a signal to terminate it (and its child processes, if |
| 699 | any), and calls the process sentinel if it has one. @xref{Sentinels}. | 699 | any), and calls the process sentinel. @xref{Sentinels}. |
| 700 | 700 | ||
| 701 | When a process is deleted, the process object itself continues to | 701 | When a process is deleted, the process object itself continues to |
| 702 | exist as long as other Lisp objects point to it. All the Lisp | 702 | exist as long as other Lisp objects point to it. All the Lisp |
| @@ -719,7 +719,7 @@ signal. The argument may be a process, the name of a process, a | |||
| 719 | buffer, or the name of a buffer. (A buffer or buffer-name stands for | 719 | buffer, or the name of a buffer. (A buffer or buffer-name stands for |
| 720 | the process that @code{get-buffer-process} returns.) Calling | 720 | the process that @code{get-buffer-process} returns.) Calling |
| 721 | @code{delete-process} on a running process terminates it, updates the | 721 | @code{delete-process} on a running process terminates it, updates the |
| 722 | process status, and runs the sentinel (if any) immediately. If the | 722 | process status, and runs the sentinel immediately. If the |
| 723 | process has already terminated, calling @code{delete-process} has no | 723 | process has already terminated, calling @code{delete-process} has no |
| 724 | effect on its status, or on the running of its sentinel (which will | 724 | effect on its status, or on the running of its sentinel (which will |
| 725 | happen sooner or later). | 725 | happen sooner or later). |
| @@ -1170,7 +1170,7 @@ redirect one of them to a file---for example, by using an appropriate | |||
| 1170 | shell command. | 1170 | shell command. |
| 1171 | 1171 | ||
| 1172 | @menu | 1172 | @menu |
| 1173 | * Process Buffers:: If no filter, output is put in a buffer. | 1173 | * Process Buffers:: By default, output is put in a buffer. |
| 1174 | * Filter Functions:: Filter functions accept output from the process. | 1174 | * Filter Functions:: Filter functions accept output from the process. |
| 1175 | * Decoding Output:: Filters can get unibyte or multibyte strings. | 1175 | * Decoding Output:: Filters can get unibyte or multibyte strings. |
| 1176 | * Accepting Output:: How to wait until process output arrives. | 1176 | * Accepting Output:: How to wait until process output arrives. |
| @@ -1187,11 +1187,12 @@ normal practice only one process is associated with any given buffer. | |||
| 1187 | Many applications of processes also use the buffer for editing input to | 1187 | Many applications of processes also use the buffer for editing input to |
| 1188 | be sent to the process, but this is not built into Emacs Lisp. | 1188 | be sent to the process, but this is not built into Emacs Lisp. |
| 1189 | 1189 | ||
| 1190 | Unless the process has a filter function (@pxref{Filter Functions}), | 1190 | By default, process output is inserted in the associated buffer. |
| 1191 | its output is inserted in the associated buffer. The position to insert | 1191 | (You can change this by defining a custom filter function, |
| 1192 | the output is determined by the @code{process-mark}, which is then | 1192 | @pxref{Filter Functions}). The position to insert the output is |
| 1193 | updated to point to the end of the text just inserted. Usually, but not | 1193 | determined by the @code{process-mark}, which is then updated to point |
| 1194 | always, the @code{process-mark} is at the end of the buffer. | 1194 | to the end of the text just inserted. Usually, but not always, the |
| 1195 | @code{process-mark} is at the end of the buffer. | ||
| 1195 | 1196 | ||
| 1196 | @findex process-kill-buffer-query-function | 1197 | @findex process-kill-buffer-query-function |
| 1197 | Killing the associated buffer of a process also kills the process. | 1198 | Killing the associated buffer of a process also kills the process. |
| @@ -1268,10 +1269,9 @@ subprocess with a @code{SIGHUP} signal (@pxref{Signals to Processes}). | |||
| 1268 | @cindex process filter | 1269 | @cindex process filter |
| 1269 | 1270 | ||
| 1270 | A process @dfn{filter function} is a function that receives the | 1271 | A process @dfn{filter function} is a function that receives the |
| 1271 | standard output from the associated process. If a process has a filter, | 1272 | standard output from the associated process. @emph{all} output from |
| 1272 | then @emph{all} output from that process is passed to the filter. The | 1273 | that process is passed to the filter. The default filter simply |
| 1273 | process buffer is used directly for output from the process only when | 1274 | outputs directly to the process buffer. |
| 1274 | there is no filter. | ||
| 1275 | 1275 | ||
| 1276 | The filter function can only be called when Emacs is waiting for | 1276 | The filter function can only be called when Emacs is waiting for |
| 1277 | something, because process output arrives only at such times. Emacs | 1277 | something, because process output arrives only at such times. Emacs |
| @@ -1300,8 +1300,8 @@ This makes it possible to use the Lisp debugger to debug the | |||
| 1300 | filter function. @xref{Debugger}. | 1300 | filter function. @xref{Debugger}. |
| 1301 | 1301 | ||
| 1302 | Many filter functions sometimes (or always) insert the output in the | 1302 | Many filter functions sometimes (or always) insert the output in the |
| 1303 | process's buffer, mimicking the actions of Emacs when there is no | 1303 | process's buffer, mimicking the actions of the default filter. |
| 1304 | filter. Such filter functions need to make sure that they save the | 1304 | Such filter functions need to make sure that they save the |
| 1305 | current buffer, select the correct buffer (if different) before | 1305 | current buffer, select the correct buffer (if different) before |
| 1306 | inserting output, and then restore the original buffer. | 1306 | inserting output, and then restore the original buffer. |
| 1307 | They should also check whether the buffer is still alive, update the | 1307 | They should also check whether the buffer is still alive, update the |
| @@ -1357,12 +1357,12 @@ received text into a temporary buffer, which can then be searched. | |||
| 1357 | 1357 | ||
| 1358 | @defun set-process-filter process filter | 1358 | @defun set-process-filter process filter |
| 1359 | This function gives @var{process} the filter function @var{filter}. If | 1359 | This function gives @var{process} the filter function @var{filter}. If |
| 1360 | @var{filter} is @code{nil}, it gives the process no filter. | 1360 | @var{filter} is @code{nil}, it gives the process the default filter, |
| 1361 | which inserts the process output into the process buffer. | ||
| 1361 | @end defun | 1362 | @end defun |
| 1362 | 1363 | ||
| 1363 | @defun process-filter process | 1364 | @defun process-filter process |
| 1364 | This function returns the filter function of @var{process}, or @code{nil} | 1365 | This function returns the filter function of @var{process}. |
| 1365 | if it has none. | ||
| 1366 | @end defun | 1366 | @end defun |
| 1367 | 1367 | ||
| 1368 | Here is an example of the use of a filter function: | 1368 | Here is an example of the use of a filter function: |
| @@ -1401,8 +1401,7 @@ backup.mss dland syllabus.mss | |||
| 1401 | 1401 | ||
| 1402 | @ignore @c The code in this example doesn't show the right way to do things. | 1402 | @ignore @c The code in this example doesn't show the right way to do things. |
| 1403 | Here is another, more realistic example, which demonstrates how to use | 1403 | Here is another, more realistic example, which demonstrates how to use |
| 1404 | the process mark to do insertion in the same fashion as is done when | 1404 | the process mark to do insertion in the same fashion as the default filter: |
| 1405 | there is no filter function: | ||
| 1406 | 1405 | ||
| 1407 | @smallexample | 1406 | @smallexample |
| 1408 | @group | 1407 | @group |
| @@ -1474,9 +1473,9 @@ until output arrives from a process. | |||
| 1474 | 1473 | ||
| 1475 | @defun accept-process-output &optional process seconds millisec just-this-one | 1474 | @defun accept-process-output &optional process seconds millisec just-this-one |
| 1476 | This function allows Emacs to read pending output from processes. The | 1475 | This function allows Emacs to read pending output from processes. The |
| 1477 | output is inserted in the associated buffers or given to their filter | 1476 | output is given to their filter functions. If @var{process} is |
| 1478 | functions. If @var{process} is non-@code{nil} then this function does | 1477 | non-@code{nil} then this function does not return until some output |
| 1479 | not return until some output has been received from @var{process}. | 1478 | has been received from @var{process}. |
| 1480 | 1479 | ||
| 1481 | The arguments @var{seconds} and @var{millisec} let you specify timeout | 1480 | The arguments @var{seconds} and @var{millisec} let you specify timeout |
| 1482 | periods. The former specifies a period measured in seconds and the | 1481 | periods. The former specifies a period measured in seconds and the |
| @@ -1591,9 +1590,9 @@ while executing sentinels. @xref{Match Data}. | |||
| 1591 | 1590 | ||
| 1592 | @defun set-process-sentinel process sentinel | 1591 | @defun set-process-sentinel process sentinel |
| 1593 | This function associates @var{sentinel} with @var{process}. If | 1592 | This function associates @var{sentinel} with @var{process}. If |
| 1594 | @var{sentinel} is @code{nil}, then the process will have no sentinel. | 1593 | @var{sentinel} is @code{nil}, then the process will have the default |
| 1595 | The default behavior when there is no sentinel is to insert a message in | 1594 | sentinel, which inserts a message in the process's buffer when the |
| 1596 | the process's buffer when the process status changes. | 1595 | process status changes. |
| 1597 | 1596 | ||
| 1598 | Changes in process sentinels take effect immediately---if the sentinel | 1597 | Changes in process sentinels take effect immediately---if the sentinel |
| 1599 | is slated to be run but has not been called yet, and you specify a new | 1598 | is slated to be run but has not been called yet, and you specify a new |
| @@ -1616,8 +1615,7 @@ sentinel, the eventual call to the sentinel will use the new one. | |||
| 1616 | @end defun | 1615 | @end defun |
| 1617 | 1616 | ||
| 1618 | @defun process-sentinel process | 1617 | @defun process-sentinel process |
| 1619 | This function returns the sentinel of @var{process}, or @code{nil} if it | 1618 | This function returns the sentinel of @var{process}. |
| 1620 | has none. | ||
| 1621 | @end defun | 1619 | @end defun |
| 1622 | 1620 | ||
| 1623 | @defun waiting-for-user-input-p | 1621 | @defun waiting-for-user-input-p |
| @@ -1974,7 +1972,7 @@ is modified as necessary to make it unique. | |||
| 1974 | 1972 | ||
| 1975 | The @var{buffer} argument is the buffer to associate with the | 1973 | The @var{buffer} argument is the buffer to associate with the |
| 1976 | connection. Output from the connection is inserted in the buffer, | 1974 | connection. Output from the connection is inserted in the buffer, |
| 1977 | unless you specify a filter function to handle the output. If | 1975 | unless you specify your own filter function to handle the output. If |
| 1978 | @var{buffer} is @code{nil}, it means that the connection is not | 1976 | @var{buffer} is @code{nil}, it means that the connection is not |
| 1979 | associated with any buffer. | 1977 | associated with any buffer. |
| 1980 | 1978 | ||
| @@ -2082,7 +2080,7 @@ unique number in brackets, as in @samp{<@var{nnn}>}. The number | |||
| 2082 | is unique for each connection in the Emacs session. | 2080 | is unique for each connection in the Emacs session. |
| 2083 | 2081 | ||
| 2084 | @item | 2082 | @item |
| 2085 | If the server's filter is non-@code{nil}, the connection process does | 2083 | If the server has a non-default filter, the connection process does |
| 2086 | not get a separate process buffer; otherwise, Emacs creates a new | 2084 | not get a separate process buffer; otherwise, Emacs creates a new |
| 2087 | buffer for the purpose. The buffer name is the server's buffer name | 2085 | buffer for the purpose. The buffer name is the server's buffer name |
| 2088 | or process name, concatenated with the client identification string. | 2086 | or process name, concatenated with the client identification string. |
| @@ -2284,7 +2282,8 @@ Initialize the process query flag to @var{query-flag}. | |||
| 2284 | @xref{Query Before Exit}. | 2282 | @xref{Query Before Exit}. |
| 2285 | 2283 | ||
| 2286 | @item :filter @var{filter} | 2284 | @item :filter @var{filter} |
| 2287 | Initialize the process filter to @var{filter}. | 2285 | Initialize the process filter to @var{filter}. (Otherwise the default |
| 2286 | filter is used.) | ||
| 2288 | 2287 | ||
| 2289 | @item :filter-multibyte @var{multibyte} | 2288 | @item :filter-multibyte @var{multibyte} |
| 2290 | If @var{multibyte} is non-@code{nil}, strings given to the process | 2289 | If @var{multibyte} is non-@code{nil}, strings given to the process |
| @@ -2292,7 +2291,8 @@ filter are multibyte, otherwise they are unibyte. The default is the | |||
| 2292 | default value of @code{enable-multibyte-characters}. | 2291 | default value of @code{enable-multibyte-characters}. |
| 2293 | 2292 | ||
| 2294 | @item :sentinel @var{sentinel} | 2293 | @item :sentinel @var{sentinel} |
| 2295 | Initialize the process sentinel to @var{sentinel}. | 2294 | Initialize the process sentinel to @var{sentinel}. (Otherwise the default |
| 2295 | sentinel is used.) | ||
| 2296 | 2296 | ||
| 2297 | @item :log @var{log} | 2297 | @item :log @var{log} |
| 2298 | Initialize the log function of a server process to @var{log}. The log | 2298 | Initialize the log function of a server process to @var{log}. The log |
| @@ -2580,10 +2580,12 @@ state is cleared by @code{continue-process} and set by | |||
| 2580 | @code{stop-process}. | 2580 | @code{stop-process}. |
| 2581 | 2581 | ||
| 2582 | @item :filter @var{filter} | 2582 | @item :filter @var{filter} |
| 2583 | Install @var{filter} as the process filter. | 2583 | Install @var{filter} as the process filter. (Otherwise the default |
| 2584 | filter is used.) | ||
| 2584 | 2585 | ||
| 2585 | @item :sentinel @var{sentinel} | 2586 | @item :sentinel @var{sentinel} |
| 2586 | Install @var{sentinel} as the process sentinel. | 2587 | Install @var{sentinel} as the process sentinel. (Otherwise the default |
| 2588 | sentinel is used.) | ||
| 2587 | 2589 | ||
| 2588 | @item :plist @var{plist} | 2590 | @item :plist @var{plist} |
| 2589 | Install @var{plist} as the initial plist of the process. | 2591 | Install @var{plist} as the initial plist of the process. |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index e2ef448c3cd..7dbf46cf1a2 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-02-21 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * flymake.texi (Starting the syntax check process): Grammar fix. | ||
| 4 | |||
| 5 | * tramp.texi (External packages): Grammar fix. | ||
| 6 | Reword for default sentinel not being nil any more. | ||
| 7 | |||
| 1 | 2014-02-19 Michael Albinus <michael.albinus@gmx.de> | 8 | 2014-02-19 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 9 | ||
| 3 | * trampver.texi: Update release number. | 10 | * trampver.texi: Update release number. |
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index a9904530e13..5125acd1f0d 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi | |||
| @@ -695,8 +695,8 @@ Buildfile values are also cached. | |||
| 695 | 695 | ||
| 696 | The command line (command name and the list of arguments) for launching a process is returned by the | 696 | The command line (command name and the list of arguments) for launching a process is returned by the |
| 697 | initialization function. Flymake then just calls @code{start-process} | 697 | initialization function. Flymake then just calls @code{start-process} |
| 698 | to start an asynchronous process and configures process filter and | 698 | to start an asynchronous process and configures a process filter and |
| 699 | sentinel which is used for processing the output of the syntax check | 699 | sentinel, which are used for processing the output of the syntax check |
| 700 | tool. | 700 | tool. |
| 701 | 701 | ||
| 702 | @node Parsing the output | 702 | @node Parsing the output |
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index b3057c255fc..6dd5d2a88d8 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -3766,10 +3766,10 @@ its complete cache keeping attributes for all files of the remote host | |||
| 3766 | it has seen so far. | 3766 | it has seen so far. |
| 3767 | 3767 | ||
| 3768 | This is a performance degradation, because the lost file attributes | 3768 | This is a performance degradation, because the lost file attributes |
| 3769 | must be recomputed when needed again. In cases the caller of | 3769 | must be recomputed when needed again. In cases where the caller of |
| 3770 | @code{process-file} knows that there are no file attribute changes, it | 3770 | @code{process-file} knows that there are no file attribute changes, it |
| 3771 | shall let-bind the variable @code{process-file-side-effects} to | 3771 | should let-bind the variable @code{process-file-side-effects} to |
| 3772 | @code{nil}. @value{tramp} wouldn't flush the file attributes cache then. | 3772 | @code{nil}. Then @value{tramp} won't flush the file attributes cache. |
| 3773 | 3773 | ||
| 3774 | @lisp | 3774 | @lisp |
| 3775 | (let (process-file-side-effects) | 3775 | (let (process-file-side-effects) |
| @@ -3779,8 +3779,8 @@ shall let-bind the variable @code{process-file-side-effects} to | |||
| 3779 | For asynchronous processes, @value{tramp} flushes the file attributes | 3779 | For asynchronous processes, @value{tramp} flushes the file attributes |
| 3780 | cache via a process sentinel. If the caller of | 3780 | cache via a process sentinel. If the caller of |
| 3781 | @code{start-file-process} knows that there are no file attribute | 3781 | @code{start-file-process} knows that there are no file attribute |
| 3782 | changes, it shall set the process sentinel to @code{nil}. In case the | 3782 | changes, it should set the process sentinel to the default. In cases |
| 3783 | caller defines an own process sentinel, @value{tramp}'s process | 3783 | where the caller defines its own process sentinel, @value{tramp}'s process |
| 3784 | sentinel is overwritten. The caller can still flush the file | 3784 | sentinel is overwritten. The caller can still flush the file |
| 3785 | attributes cache in its process sentinel with this code: | 3785 | attributes cache in its process sentinel with this code: |
| 3786 | 3786 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 2b631dfc5f9..70fce9add14 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-02-21 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * process.c (Fprocess_buffer, Faccept_process_output) | ||
| 4 | (Finternal_default_process_filter, Finternal_default_process_sentinel): | ||
| 5 | Doc fixes. | ||
| 6 | |||
| 1 | 2014-02-21 Martin Rudalics <rudalics@gmx.at> | 7 | 2014-02-21 Martin Rudalics <rudalics@gmx.at> |
| 2 | 8 | ||
| 3 | * window.c (Fwindow_scroll_bar_width): New function. | 9 | * window.c (Fwindow_scroll_bar_width): New function. |
diff --git a/src/process.c b/src/process.c index 85470b66c3e..c891962ecb2 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Asynchronous subprocess control for GNU Emacs. | 1 | /* Asynchronous subprocess control for GNU Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2014 Free Software | 3 | Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2014 |
| 4 | Foundation, Inc. | 4 | Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -1022,7 +1022,7 @@ Return BUFFER. */) | |||
| 1022 | DEFUN ("process-buffer", Fprocess_buffer, Sprocess_buffer, | 1022 | DEFUN ("process-buffer", Fprocess_buffer, Sprocess_buffer, |
| 1023 | 1, 1, 0, | 1023 | 1, 1, 0, |
| 1024 | doc: /* Return the buffer PROCESS is associated with. | 1024 | doc: /* Return the buffer PROCESS is associated with. |
| 1025 | Output from PROCESS is inserted in this buffer unless PROCESS has a filter. */) | 1025 | The default process filter inserts output from PROCESS into this buffer. */) |
| 1026 | (register Lisp_Object process) | 1026 | (register Lisp_Object process) |
| 1027 | { | 1027 | { |
| 1028 | CHECK_PROCESS (process); | 1028 | CHECK_PROCESS (process); |
| @@ -1049,7 +1049,7 @@ passed to the filter. | |||
| 1049 | 1049 | ||
| 1050 | The filter gets two arguments: the process and the string of output. | 1050 | The filter gets two arguments: the process and the string of output. |
| 1051 | The string argument is normally a multibyte string, except: | 1051 | The string argument is normally a multibyte string, except: |
| 1052 | - if the process' input coding system is no-conversion or raw-text, | 1052 | - if the process's input coding system is no-conversion or raw-text, |
| 1053 | it is a unibyte string (the non-converted input), or else | 1053 | it is a unibyte string (the non-converted input), or else |
| 1054 | - if `default-enable-multibyte-characters' is nil, it is a unibyte | 1054 | - if `default-enable-multibyte-characters' is nil, it is a unibyte |
| 1055 | string (the result of converting the decoded input multibyte | 1055 | string (the result of converting the decoded input multibyte |
| @@ -1061,7 +1061,7 @@ The string argument is normally a multibyte string, except: | |||
| 1061 | CHECK_PROCESS (process); | 1061 | CHECK_PROCESS (process); |
| 1062 | p = XPROCESS (process); | 1062 | p = XPROCESS (process); |
| 1063 | 1063 | ||
| 1064 | /* Don't signal an error if the process' input file descriptor | 1064 | /* Don't signal an error if the process's input file descriptor |
| 1065 | is closed. This could make debugging Lisp more difficult, | 1065 | is closed. This could make debugging Lisp more difficult, |
| 1066 | for example when doing something like | 1066 | for example when doing something like |
| 1067 | 1067 | ||
| @@ -2758,7 +2758,7 @@ client. The arguments are SERVER, CLIENT, and MESSAGE, where SERVER | |||
| 2758 | is the server process, CLIENT is the new process for the connection, | 2758 | is the server process, CLIENT is the new process for the connection, |
| 2759 | and MESSAGE is a string. | 2759 | and MESSAGE is a string. |
| 2760 | 2760 | ||
| 2761 | :plist PLIST -- Install PLIST as the new process' initial plist. | 2761 | :plist PLIST -- Install PLIST as the new process's initial plist. |
| 2762 | 2762 | ||
| 2763 | :server QLEN -- if QLEN is non-nil, create a server process for the | 2763 | :server QLEN -- if QLEN is non-nil, create a server process for the |
| 2764 | specified FAMILY, SERVICE, and connection type (stream or datagram). | 2764 | specified FAMILY, SERVICE, and connection type (stream or datagram). |
| @@ -2788,21 +2788,21 @@ When a client connection is accepted, a new network process is created | |||
| 2788 | for the connection with the following parameters: | 2788 | for the connection with the following parameters: |
| 2789 | 2789 | ||
| 2790 | - The client's process name is constructed by concatenating the server | 2790 | - The client's process name is constructed by concatenating the server |
| 2791 | process' NAME and a client identification string. | 2791 | process's NAME and a client identification string. |
| 2792 | - If the FILTER argument is non-nil, the client process will not get a | 2792 | - If the FILTER argument is non-nil, the client process will not get a |
| 2793 | separate process buffer; otherwise, the client's process buffer is a newly | 2793 | separate process buffer; otherwise, the client's process buffer is a newly |
| 2794 | created buffer named after the server process' BUFFER name or process | 2794 | created buffer named after the server process's BUFFER name or process |
| 2795 | NAME concatenated with the client identification string. | 2795 | NAME concatenated with the client identification string. |
| 2796 | - The connection type and the process filter and sentinel parameters are | 2796 | - The connection type and the process filter and sentinel parameters are |
| 2797 | inherited from the server process' TYPE, FILTER and SENTINEL. | 2797 | inherited from the server process's TYPE, FILTER and SENTINEL. |
| 2798 | - The client process' contact info is set according to the client's | 2798 | - The client process's contact info is set according to the client's |
| 2799 | addressing information (typically an IP address and a port number). | 2799 | addressing information (typically an IP address and a port number). |
| 2800 | - The client process' plist is initialized from the server's plist. | 2800 | - The client process's plist is initialized from the server's plist. |
| 2801 | 2801 | ||
| 2802 | Notice that the FILTER and SENTINEL args are never used directly by | 2802 | Notice that the FILTER and SENTINEL args are never used directly by |
| 2803 | the server process. Also, the BUFFER argument is not used directly by | 2803 | the server process. Also, the BUFFER argument is not used directly by |
| 2804 | the server process, but via the optional :log function, accepted (and | 2804 | the server process, but via the optional :log function, accepted (and |
| 2805 | failed) connections may be logged in the server process' buffer. | 2805 | failed) connections may be logged in the server process's buffer. |
| 2806 | 2806 | ||
| 2807 | The original argument list, modified with the actual connection | 2807 | The original argument list, modified with the actual connection |
| 2808 | information, is available via the `process-contact' function. | 2808 | information, is available via the `process-contact' function. |
| @@ -3917,7 +3917,7 @@ deactivate_process (Lisp_Object proc) | |||
| 3917 | DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output, | 3917 | DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output, |
| 3918 | 0, 4, 0, | 3918 | 0, 4, 0, |
| 3919 | doc: /* Allow any pending output from subprocesses to be read by Emacs. | 3919 | doc: /* Allow any pending output from subprocesses to be read by Emacs. |
| 3920 | It is read into the process' buffers or given to their filter functions. | 3920 | It is given to their filter functions. |
| 3921 | Non-nil arg PROCESS means do not return until some output has been received | 3921 | Non-nil arg PROCESS means do not return until some output has been received |
| 3922 | from PROCESS. | 3922 | from PROCESS. |
| 3923 | 3923 | ||
| @@ -5187,7 +5187,8 @@ read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars, | |||
| 5187 | 5187 | ||
| 5188 | DEFUN ("internal-default-process-filter", Finternal_default_process_filter, | 5188 | DEFUN ("internal-default-process-filter", Finternal_default_process_filter, |
| 5189 | Sinternal_default_process_filter, 2, 2, 0, | 5189 | Sinternal_default_process_filter, 2, 2, 0, |
| 5190 | doc: /* Function used as default process filter. */) | 5190 | doc: /* Function used as default process filter. |
| 5191 | This inserts the process's output into its buffer. */) | ||
| 5191 | (Lisp_Object proc, Lisp_Object text) | 5192 | (Lisp_Object proc, Lisp_Object text) |
| 5192 | { | 5193 | { |
| 5193 | struct Lisp_Process *p; | 5194 | struct Lisp_Process *p; |
| @@ -6411,7 +6412,8 @@ status_notify (struct Lisp_Process *deleting_process) | |||
| 6411 | 6412 | ||
| 6412 | DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel, | 6413 | DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel, |
| 6413 | Sinternal_default_process_sentinel, 2, 2, 0, | 6414 | Sinternal_default_process_sentinel, 2, 2, 0, |
| 6414 | doc: /* Function used as default sentinel for processes. */) | 6415 | doc: /* Function used as default sentinel for processes. |
| 6416 | This inserts a status message into the process's buffer. */) | ||
| 6415 | (Lisp_Object proc, Lisp_Object msg) | 6417 | (Lisp_Object proc, Lisp_Object msg) |
| 6416 | { | 6418 | { |
| 6417 | Lisp_Object buffer, symbol; | 6419 | Lisp_Object buffer, symbol; |