diff options
| author | Paul Eggert | 2014-06-09 13:31:06 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-06-09 13:31:06 -0700 |
| commit | feb6546cdf5b43f8e50aaaabb29c6856a9251893 (patch) | |
| tree | 60ecc4775ad2202b402cfe7e28f1f27d07d30331 | |
| parent | 2c70e6b00aec31c455eee2a939863a4e382986fc (diff) | |
| download | emacs-feb6546cdf5b43f8e50aaaabb29c6856a9251893.tar.gz emacs-feb6546cdf5b43f8e50aaaabb29c6856a9251893.zip | |
Say (accept-process-output P)'s result pertains to P if P is non-nil.
* doc/lispref/processes.texi (Accepting Output):
* src/process.c (Faccept_process_output)
(wait_reading_process_output): Mention that if PROCESS is non-nil,
the return value is about PROCESS, not about other processes.
| -rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 5 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/process.c | 25 |
4 files changed, 28 insertions, 15 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 93128962c33..d859e0f01a9 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-06-09 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Say (accept-process-output P)'s result pertains to P if P is non-nil. | ||
| 4 | * processes.texi (Accepting Output): Mention that if PROCESS is non-nil, | ||
| 5 | the return value is about PROCESS, not about other processes. | ||
| 6 | |||
| 1 | 2014-06-08 Glenn Morris <rgm@gnu.org> | 7 | 2014-06-08 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * os.texi (Startup Summary): Small fix for initial-buffer-choice. | 9 | * os.texi (Startup Summary): Small fix for initial-buffer-choice. |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index c91afdffdeb..db80f0537e0 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -1484,7 +1484,7 @@ The arguments @var{seconds} and @var{millisec} let you specify timeout | |||
| 1484 | periods. The former specifies a period measured in seconds and the | 1484 | periods. The former specifies a period measured in seconds and the |
| 1485 | latter specifies one measured in milliseconds. The two time periods | 1485 | latter specifies one measured in milliseconds. The two time periods |
| 1486 | thus specified are added together, and @code{accept-process-output} | 1486 | thus specified are added together, and @code{accept-process-output} |
| 1487 | returns after that much time, whether or not there has been any | 1487 | returns after that much time, even if there is no |
| 1488 | subprocess output. | 1488 | subprocess output. |
| 1489 | 1489 | ||
| 1490 | The argument @var{millisec} is obsolete (and should not be used), | 1490 | The argument @var{millisec} is obsolete (and should not be used), |
| @@ -1502,7 +1502,8 @@ recommended, but may be necessary for specific applications, such as | |||
| 1502 | speech synthesis. | 1502 | speech synthesis. |
| 1503 | 1503 | ||
| 1504 | The function @code{accept-process-output} returns non-@code{nil} if it | 1504 | The function @code{accept-process-output} returns non-@code{nil} if it |
| 1505 | did get some output, or @code{nil} if the timeout expired before output | 1505 | got output from @var{process}, or from any process if @var{process} is |
| 1506 | @code{nil}. It returns @code{nil} if the timeout expired before output | ||
| 1506 | arrived. | 1507 | arrived. |
| 1507 | @end defun | 1508 | @end defun |
| 1508 | 1509 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 5fbf2e377e5..acddd01dc4f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-06-09 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Say (accept-process-output P)'s result pertains to P if P is non-nil. | ||
| 4 | * process.c (Faccept_process_output) | ||
| 5 | (wait_reading_process_output): Mention that if PROCESS is non-nil, | ||
| 6 | the return value is about PROCESS, not about other processes. | ||
| 7 | |||
| 1 | 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru> | 8 | 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 9 | ||
| 3 | Further adjustments to mark_object and friends. | 10 | Further adjustments to mark_object and friends. |
diff --git a/src/process.c b/src/process.c index b8b8eaaee5b..5006c85fe9d 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3921,19 +3921,20 @@ DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output, | |||
| 3921 | 0, 4, 0, | 3921 | 0, 4, 0, |
| 3922 | doc: /* Allow any pending output from subprocesses to be read by Emacs. | 3922 | doc: /* Allow any pending output from subprocesses to be read by Emacs. |
| 3923 | It is given to their filter functions. | 3923 | It is given to their filter functions. |
| 3924 | Non-nil arg PROCESS means do not return until some output has been received | 3924 | Optional argument PROCESS means do not return until output has been |
| 3925 | from PROCESS. | 3925 | received from PROCESS. |
| 3926 | 3926 | ||
| 3927 | Non-nil second arg SECONDS and third arg MILLISEC are number of seconds | 3927 | Optional second argument SECONDS and third argument MILLISEC |
| 3928 | and milliseconds to wait; return after that much time whether or not | 3928 | specify a timeout; return after that much time even if there is |
| 3929 | there is any subprocess output. If SECONDS is a floating point number, | 3929 | no subprocess output. If SECONDS is a floating point number, |
| 3930 | it specifies a fractional number of seconds to wait. | 3930 | it specifies a fractional number of seconds to wait. |
| 3931 | The MILLISEC argument is obsolete and should be avoided. | 3931 | The MILLISEC argument is obsolete and should be avoided. |
| 3932 | 3932 | ||
| 3933 | If optional fourth arg JUST-THIS-ONE is non-nil, only accept output | 3933 | If optional fourth argument JUST-THIS-ONE is non-nil, accept output |
| 3934 | from PROCESS, suspending reading output from other processes. | 3934 | from PROCESS only, suspending reading output from other processes. |
| 3935 | If JUST-THIS-ONE is an integer, don't run any timers either. | 3935 | If JUST-THIS-ONE is an integer, don't run any timers either. |
| 3936 | Return non-nil if we received any output before the timeout expired. */) | 3936 | Return non-nil if we received any output from PROCESS (or, if PROCESS |
| 3937 | is nil, from any process) before the timeout expired. */) | ||
| 3937 | (register Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, Lisp_Object just_this_one) | 3938 | (register Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, Lisp_Object just_this_one) |
| 3938 | { | 3939 | { |
| 3939 | intmax_t secs; | 3940 | intmax_t secs; |
| @@ -4255,16 +4256,14 @@ wait_reading_process_output_1 (void) | |||
| 4255 | (and gobble terminal input into the buffer if any arrives). | 4256 | (and gobble terminal input into the buffer if any arrives). |
| 4256 | 4257 | ||
| 4257 | If WAIT_PROC is specified, wait until something arrives from that | 4258 | If WAIT_PROC is specified, wait until something arrives from that |
| 4258 | process. The return value is true if we read some input from | 4259 | process. |
| 4259 | that process. | ||
| 4260 | 4260 | ||
| 4261 | If JUST_WAIT_PROC is nonzero, handle only output from WAIT_PROC | 4261 | If JUST_WAIT_PROC is nonzero, handle only output from WAIT_PROC |
| 4262 | (suspending output from other processes). A negative value | 4262 | (suspending output from other processes). A negative value |
| 4263 | means don't run any timers either. | 4263 | means don't run any timers either. |
| 4264 | 4264 | ||
| 4265 | If WAIT_PROC is specified, then the function returns true if we | 4265 | Return true if we received input from WAIT_PROC, or from any |
| 4266 | received input from that process before the timeout elapsed. | 4266 | process if WAIT_PROC is null. */ |
| 4267 | Otherwise, return true if we received input from any process. */ | ||
| 4268 | 4267 | ||
| 4269 | bool | 4268 | bool |
| 4270 | wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | 4269 | wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, |