# HG changeset patch # User Richard M. Stallman # Date 751252564 0 # Node ID c53deda13fa9ec660f3420dc115481b66aa7c80b # Parent a3a72fce114301a2555990fb925d6405ad7ed847 (status_notify): Don't read from process if filter is t. (Fset_process_filter): Set or clear bit in input_wait_mask when nec. diff -r a3a72fce1143 -r c53deda13fa9 src/process.c --- a/src/process.c Thu Oct 21 21:25:05 1993 +0000 +++ b/src/process.c Fri Oct 22 01:16:04 1993 +0000 @@ -678,6 +678,7 @@ DEFUN ("set-process-filter", Fset_process_filter, Sset_process_filter, 2, 2, 0, "Give PROCESS the filter function FILTER; nil means no filter.\n\ +t means stop accepting output from the process.\n\ When a process has a filter, each time it does output\n\ the entire string of output is passed to the filter.\n\ The filter gets two arguments: the process and the string of output.\n\ @@ -686,6 +687,10 @@ register Lisp_Object proc, filter; { CHECK_PROCESS (proc, 0); + if (EQ (filter, Qt)) + FD_CLR (XPROCESS (proc)->infd, &input_wait_mask); + else if (EQ (XPROCESS (proc)->filter, Qt)) + FD_SET (XPROCESS (proc)->infd, &input_wait_mask); XPROCESS (proc)->filter = filter; return filter; } @@ -2849,7 +2854,8 @@ /* If process is still active, read any output that remains. */ if (XFASTINT (p->infd)) - while (read_process_output (proc, XFASTINT (p->infd)) > 0); + while (! EQ (p->filter, Qt) + && read_process_output (proc, XFASTINT (p->infd)) > 0); buffer = p->buffer;