changeset 7352:ef89b78c1a92

(wait_reading_process_input): Don't call prepare_menu_bars unless we are going to redisplay for a garbaged frame. (read_process_output): Call prepare_menu_bars if waiting for input. (exec_sentinel): Call prepare_menu_bars if waiting for input.
author Richard M. Stallman <rms@gnu.org>
date Fri, 06 May 1994 06:39:48 +0000
parents f5cf08a3a645
children 334cececa42d
files src/process.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Fri May 06 06:25:15 1994 +0000
+++ b/src/process.c	Fri May 06 06:39:48 1994 +0000
@@ -1835,7 +1835,8 @@
 
   /* It would not be safe to call this below,
      where we call redisplay_preserve_echo_area.  */
-  prepare_menu_bars ();
+  if (do_display && frame_garbaged)
+    prepare_menu_bars ();
 
   while (1)
     {
@@ -2215,6 +2216,9 @@
       if (! EQ (Fcurrent_buffer (), obuffer))
 	record_asynch_buffer_change ();
 
+      if (waiting_for_user_input_p)
+	prepare_menu_bars ();
+
 #ifdef VMS
       start_vms_process_read (vs);
 #endif
@@ -2289,11 +2293,11 @@
 
 DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p,
        0, 0, 0,
-  "Returns non-NIL if emacs is waiting for input from the user.\n\
+  "Returns non-nil if emacs is waiting for input from the user.\n\
 This is intended for use by asynchronous process output filters and sentinels.")
        ()
 {
-  return ((waiting_for_user_input_p) ? Qt : Qnil);
+  return (waiting_for_user_input_p ? Qt : Qnil);
 }
 
 /* Sending data to subprocess */
@@ -3017,6 +3021,8 @@
   /* Inhibit quit so that random quits don't screw up a running filter.  */
   specbind (Qinhibit_quit, Qt);
   call2 (sentinel, proc, reason);
+  if (waiting_for_user_input_p)
+    prepare_menu_bars ();
   unbind_to (count, Qnil);
 }