]> git.eshelyaron.com Git - emacs.git/commitdiff
Say (accept-process-output P)'s result pertains to P if P is non-nil.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 9 Jun 2014 20:31:06 +0000 (13:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 9 Jun 2014 20:31:06 +0000 (13:31 -0700)
* 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.

doc/lispref/ChangeLog
doc/lispref/processes.texi
src/ChangeLog
src/process.c

index 93128962c332fb1fee3d953ecb7cab15395c658f..d859e0f01a918581920ad2d61c0aa0cf5f0cbbfa 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Say (accept-process-output P)'s result pertains to P if P is non-nil.
+       * processes.texi (Accepting Output): Mention that if PROCESS is non-nil,
+       the return value is about PROCESS, not about other processes.
+
 2014-06-08  Glenn Morris  <rgm@gnu.org>
 
        * os.texi (Startup Summary): Small fix for initial-buffer-choice.
index c91afdffdebd1085d266d69d719f9440771c3ece..db80f0537e09d09618b5d2849141c7b8b5b450cd 100644 (file)
@@ -1484,7 +1484,7 @@ The arguments @var{seconds} and @var{millisec} let you specify timeout
 periods.  The former specifies a period measured in seconds and the
 latter specifies one measured in milliseconds.  The two time periods
 thus specified are added together, and @code{accept-process-output}
-returns after that much time, whether or not there has been any
+returns after that much time, even if there is no
 subprocess output.
 
 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
 speech synthesis.
 
 The function @code{accept-process-output} returns non-@code{nil} if it
-did get some output, or @code{nil} if the timeout expired before output
+got output from @var{process}, or from any process if @var{process} is
+@code{nil}.  It returns @code{nil} if the timeout expired before output
 arrived.
 @end defun
 
index 5fbf2e377e5261c5b32b7386dc2a1cf72ee3bc49..acddd01dc4f41b613578127e759cc211142b9f97 100644 (file)
@@ -1,3 +1,10 @@
+2014-06-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Say (accept-process-output P)'s result pertains to P if P is non-nil.
+       * 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.
+
 2014-06-09  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Further adjustments to mark_object and friends.
index b8b8eaaee5bd500209bbc3c5cde71cfec8d98732..5006c85fe9da628855e632a3a672546e4092a506 100644 (file)
@@ -3921,19 +3921,20 @@ DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output,
        0, 4, 0,
        doc: /* Allow any pending output from subprocesses to be read by Emacs.
 It is given to their filter functions.
-Non-nil arg PROCESS means do not return until some output has been received
-from PROCESS.
+Optional argument PROCESS means do not return until output has been
+received from PROCESS.
 
-Non-nil second arg SECONDS and third arg MILLISEC are number of seconds
-and milliseconds to wait; return after that much time whether or not
-there is any subprocess output.  If SECONDS is a floating point number,
+Optional second argument SECONDS and third argument MILLISEC
+specify a timeout; return after that much time even if there is
+no subprocess output.  If SECONDS is a floating point number,
 it specifies a fractional number of seconds to wait.
 The MILLISEC argument is obsolete and should be avoided.
 
-If optional fourth arg JUST-THIS-ONE is non-nil, only accept output
-from PROCESS, suspending reading output from other processes.
+If optional fourth argument JUST-THIS-ONE is non-nil, accept output
+from PROCESS only, suspending reading output from other processes.
 If JUST-THIS-ONE is an integer, don't run any timers either.
-Return non-nil if we received any output before the timeout expired.  */)
+Return non-nil if we received any output from PROCESS (or, if PROCESS
+is nil, from any process) before the timeout expired.  */)
   (register Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, Lisp_Object just_this_one)
 {
   intmax_t secs;
@@ -4255,16 +4256,14 @@ wait_reading_process_output_1 (void)
      (and gobble terminal input into the buffer if any arrives).
 
    If WAIT_PROC is specified, wait until something arrives from that
-     process.  The return value is true if we read some input from
-     that process.
+     process.
 
    If JUST_WAIT_PROC is nonzero, handle only output from WAIT_PROC
      (suspending output from other processes).  A negative value
      means don't run any timers either.
 
-   If WAIT_PROC is specified, then the function returns true if we
-     received input from that process before the timeout elapsed.
-   Otherwise, return true if we received input from any process.  */
+   Return true if we received input from WAIT_PROC, or from any
+   process if WAIT_PROC is null.  */
 
 bool
 wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,