Mercurial > emacs
comparison src/xdisp.c @ 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 | 694ac11a3e1c |
children | 07ac059dece0 |
comparison
equal
deleted
inserted
replaced
28046:425a4ebe8cda | 28047:91d9cd696b80 |
---|---|
5527 | 5527 |
5528 static int | 5528 static int |
5529 display_echo_area (w) | 5529 display_echo_area (w) |
5530 struct window *w; | 5530 struct window *w; |
5531 { | 5531 { |
5532 int i, no_message_p, window_height_changed_p; | 5532 int i, no_message_p, window_height_changed_p, count; |
5533 | |
5534 /* Temporarily disable garbage collections while displaying the echo | |
5535 area. This is done because a GC can print a message itself. | |
5536 That message would modify the echo area buffer's contents while a | |
5537 redisplay of the buffer is going on, and seriously confuse | |
5538 redisplay. */ | |
5539 count = inhibit_garbage_collection (); | |
5533 | 5540 |
5534 /* If there is no message, we must call display_echo_area_1 | 5541 /* If there is no message, we must call display_echo_area_1 |
5535 nevertheless because it resizes the window. But we will have to | 5542 nevertheless because it resizes the window. But we will have to |
5536 reset the echo_area_buffer in question to nil at the end because | 5543 reset the echo_area_buffer in question to nil at the end because |
5537 with_echo_area_buffer will sets it to an empty buffer. */ | 5544 with_echo_area_buffer will sets it to an empty buffer. */ |
5542 = with_echo_area_buffer (w, display_last_displayed_message_p, | 5549 = with_echo_area_buffer (w, display_last_displayed_message_p, |
5543 (int (*) ()) display_echo_area_1, w); | 5550 (int (*) ()) display_echo_area_1, w); |
5544 | 5551 |
5545 if (no_message_p) | 5552 if (no_message_p) |
5546 echo_area_buffer[i] = Qnil; | 5553 echo_area_buffer[i] = Qnil; |
5547 | 5554 |
5555 unbind_to (count, Qnil); | |
5548 return window_height_changed_p; | 5556 return window_height_changed_p; |
5549 } | 5557 } |
5550 | 5558 |
5551 | 5559 |
5552 /* Helper for display_echo_area. Display the current buffer which | 5560 /* Helper for display_echo_area. Display the current buffer which |