emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master dd7cd14: Allow :filter t in make-process to work as with set-proc


From: Lars Ingebrigtsen
Subject: master dd7cd14: Allow :filter t in make-process to work as with set-process-filter
Date: Mon, 18 Oct 2021 02:58:11 -0400 (EDT)

branch: master
commit dd7cd14d281644d8e2c5b3f16eb7f074f61d18f7
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Allow :filter t in make-process to work as with set-process-filter
    
    * src/process.c (create_process):
    (create_pty):
    (Fmake_pipe_process):
    (Fmake_serial_process): Don't add the read_fd if the filter is t
    (which means that we don't accept output from the filter).
---
 src/process.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/process.c b/src/process.c
index 6731f88..f923aff 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2167,7 +2167,8 @@ create_process (Lisp_Object process, char **new_argv, 
Lisp_Object current_dir)
   p->pty_flag = pty_flag;
   pset_status (p, Qrun);
 
-  if (!EQ (p->command, Qt))
+  if (!EQ (p->command, Qt)
+      && !EQ (p->filter, Qt))
     add_process_read_fd (inchannel);
 
   ptrdiff_t count = SPECPDL_INDEX ();
@@ -2285,7 +2286,8 @@ create_pty (Lisp_Object process)
       pset_status (p, Qrun);
       setup_process_coding_systems (process);
 
-      add_process_read_fd (pty_fd);
+      if (!EQ (p->filter, Qt))
+       add_process_read_fd (pty_fd);
 
       pset_tty_name (p, build_string (pty_name));
     }
@@ -2394,7 +2396,8 @@ usage:  (make-pipe-process &rest ARGS)  */)
     pset_command (p, Qt);
   eassert (! p->pty_flag);
 
-  if (!EQ (p->command, Qt))
+  if (!EQ (p->command, Qt)
+      && !EQ (p->filter, Qt))
     add_process_read_fd (inchannel);
   p->adaptive_read_buffering
     = (NILP (Vprocess_adaptive_read_buffering) ? 0
@@ -3129,7 +3132,8 @@ usage:  (make-serial-process &rest ARGS)  */)
     pset_command (p, Qt);
   eassert (! p->pty_flag);
 
-  if (!EQ (p->command, Qt))
+  if (!EQ (p->command, Qt)
+      && !EQ (p->filter, Qt))
     add_process_read_fd (fd);
 
   update_process_mark (p);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]