changeset 28047:91d9cd696b80

(display_echo_area): Temporarily inhibit garbage collection.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 08 Mar 2000 13:54:28 +0000
parents 425a4ebe8cda
children b4c4dbcddc79
files src/xdisp.c
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Mar 07 23:32:47 2000 +0000
+++ b/src/xdisp.c	Wed Mar 08 13:54:28 2000 +0000
@@ -5529,7 +5529,14 @@
 display_echo_area (w)
      struct window *w;
 {
-  int i, no_message_p, window_height_changed_p;
+  int i, no_message_p, window_height_changed_p, count;
+
+  /* Temporarily disable garbage collections while displaying the echo
+     area.  This is done because a GC can print a message itself.
+     That message would modify the echo area buffer's contents while a
+     redisplay of the buffer is going on, and seriously confuse
+     redisplay.  */
+  count = inhibit_garbage_collection ();
 
   /* If there is no message, we must call display_echo_area_1
      nevertheless because it resizes the window.  But we will have to
@@ -5544,7 +5551,8 @@
 
   if (no_message_p)
     echo_area_buffer[i] = Qnil;
-  
+
+  unbind_to (count, Qnil);
   return window_height_changed_p;
 }