From: Richard M. Stallman Date: Mon, 9 Oct 1995 00:31:24 +0000 (+0000) Subject: (exec_sentinel, read_process_output): X-Git-Tag: emacs-19.34~2701 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=927e08bef8a8053157822b36a34a8d6c401631ee;p=emacs.git (exec_sentinel, read_process_output): Call record_asynch_buffer_change only if caller is reading kbd input. --- diff --git a/src/process.c b/src/process.c index 438f6e21e4c..9862bb30e85 100644 --- a/src/process.c +++ b/src/process.c @@ -2393,7 +2393,11 @@ read_process_output (proc, channel) if (! EQ (Fcurrent_buffer (), obuffer) || ! EQ (current_buffer->keymap, okeymap)) #endif - record_asynch_buffer_change (); + /* But do it only if the caller is actually going to read events. + Otherwise there's no need to make him wake up, and it could + cause trouble (for example it would make Fsit_for return). */ + if (waiting_for_user_input_p == -1) + record_asynch_buffer_change (); #ifdef VMS start_vms_process_read (vs); @@ -3391,7 +3395,11 @@ exec_sentinel (proc, reason) if (! EQ (Fcurrent_buffer (), obuffer) || ! EQ (current_buffer->keymap, okeymap)) #endif - record_asynch_buffer_change (); + /* But do it only if the caller is actually going to read events. + Otherwise there's no need to make him wake up, and it could + cause trouble (for example it would make Fsit_for return). */ + if (waiting_for_user_input_p == -1) + record_asynch_buffer_change (); unbind_to (count, Qnil); }