changeset 19053:7b5642657857

(read_process_output): Don't call setup_coding_system for proc_decode_coding_system[channel]. It is already done in detect_coding called via decode_coding. (wait_reading_process_input): Call detect_input_pending whenever read_kbd is 0, not just when wait_for_cell.
author Richard M. Stallman <rms@gnu.org>
date Thu, 31 Jul 1997 06:08:07 +0000
parents 302a7b2a6948
children e5c297c50838
files src/process.c
diffstat 1 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Thu Jul 31 05:55:12 1997 +0000
+++ b/src/process.c	Thu Jul 31 06:08:07 1997 +0000
@@ -2472,7 +2472,7 @@
       /* If there is any, return immediately
 	 to give it higher priority than subprocesses */
 
-      if ((XINT (read_kbd) != 0)
+      if (XINT (read_kbd) != 0
 	  && detect_input_pending_run_timers (do_display))
 	{
 	  swallow_events (do_display);
@@ -2485,13 +2485,14 @@
 	  && requeued_events_pending_p ())
 	break;
 
-      /* If wait_for_cell. check for keyboard input
-	 but don't run any timers.
-	 The reason for this is so that X events will be processed.
+      /* If we are not checking for keyboard input now,
+	 do process events (but don't run any timers).
+	 This is so that X events will be processed.
 	 Otherwise they may have to wait until polling takes place.
-	 That would causes delays in pasting selections, for example.  */
-      if (wait_for_cell
-	  && detect_input_pending ())
+	 That would causes delays in pasting selections, for example.
+
+	 (We used to do this only if wait_for_cell.)  */
+      if (XINT (read_kbd) == 0 && detect_input_pending ())
 	{
 	  swallow_events (do_display);
 #if 0  /* Exiting when read_kbd doesn't request that seems wrong, though.  */
@@ -2763,8 +2764,11 @@
       if (!EQ (p->decode_coding_system, coding->symbol))
 	{
 	  p->decode_coding_system = coding->symbol;
-	  setup_coding_system (coding->symbol,
-			       proc_decode_coding_system[channel]);
+
+	  /* Don't call setup_coding_system for
+             proc_decode_coding_system[channel] here.  It is done in
+             detect_coding called via decode_coding above.  */
+
 	  /* If coding-system for encoding is not yet decided, we set it
 	     as the same as coding-system for decoding.  */
 	  if (NILP (p->encode_coding_system))