aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-08-01 13:27:18 +0000
committerGerd Moellmann2001-08-01 13:27:18 +0000
commit6e019995fd3970b38219b01086f104ae0b28ec52 (patch)
tree6e80579aeb2dbb7ba8fccd7ddbdb6b942a25b5fc /src
parent308a74d8bdbc608748114c5fa35b2bc1f13a663d (diff)
downloademacs-6e019995fd3970b38219b01086f104ae0b28ec52.tar.gz
emacs-6e019995fd3970b38219b01086f104ae0b28ec52.zip
(message_cleared_p): New variable.
(clear_message): Set message_cleared_p when clearing the current message. (redisplay_internal): Look at message_cleared_p to capture the case that the echo area should be cleared.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c21
2 files changed, 24 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0fa5c980ad1..50ecb0f7ccb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
12001-08-01 Gerd Moellmann <gerd@gnu.org> 12001-08-01 Gerd Moellmann <gerd@gnu.org>
2 2
3 * xdisp.c (message_cleared_p): New variable.
4 (clear_message): Set message_cleared_p when clearing the current
5 message.
6 (redisplay_internal): Look at message_cleared_p to capture
7 the case that the echo area should be cleared.
8
3 * keyboard.c (command_loop_1): Fix spelling of 9 * keyboard.c (command_loop_1): Fix spelling of
4 resize_echo_area_exactly. 10 resize_echo_area_exactly.
5 11
diff --git a/src/xdisp.c b/src/xdisp.c
index 91b2a5e8a6d..7e0a9eea5e4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -510,6 +510,11 @@ Lisp_Object Vmax_mini_window_height;
510int message_truncate_lines; 510int message_truncate_lines;
511Lisp_Object Qmessage_truncate_lines; 511Lisp_Object Qmessage_truncate_lines;
512 512
513/* Set to 1 in clear_message to make redisplay_internal aware
514 of an emptied echo area. */
515
516static int message_cleared_p;
517
513/* Non-zero means we want a hollow cursor in windows that are not 518/* Non-zero means we want a hollow cursor in windows that are not
514 selected. Zero means there's no cursor in such windows. */ 519 selected. Zero means there's no cursor in such windows. */
515 520
@@ -6895,7 +6900,10 @@ clear_message (current_p, last_displayed_p)
6895 int current_p, last_displayed_p; 6900 int current_p, last_displayed_p;
6896{ 6901{
6897 if (current_p) 6902 if (current_p)
6898 echo_area_buffer[0] = Qnil; 6903 {
6904 echo_area_buffer[0] = Qnil;
6905 message_cleared_p = 1;
6906 }
6899 6907
6900 if (last_displayed_p) 6908 if (last_displayed_p)
6901 echo_area_buffer[1] = Qnil; 6909 echo_area_buffer[1] = Qnil;
@@ -8406,12 +8414,19 @@ redisplay_internal (preserve_echo_area)
8406 /* Normally the message* functions will have already displayed and 8414 /* Normally the message* functions will have already displayed and
8407 updated the echo area, but the frame may have been trashed, or 8415 updated the echo area, but the frame may have been trashed, or
8408 the update may have been preempted, so display the echo area 8416 the update may have been preempted, so display the echo area
8409 again here. Checking both message buffers captures the case that 8417 again here. Checking message_cleared_p captures the case that
8410 the echo area should be cleared. */ 8418 the echo area should be cleared. */
8411 if (!NILP (echo_area_buffer[0]) || !NILP (echo_area_buffer[1])) 8419 if (!NILP (echo_area_buffer[0]) || message_cleared_p)
8412 { 8420 {
8413 int window_height_changed_p = echo_area_display (0); 8421 int window_height_changed_p = echo_area_display (0);
8414 must_finish = 1; 8422 must_finish = 1;
8423
8424 /* If we don't display the current message, don't clear the
8425 message_cleared_p flag, because, if we did, we wouldn't clear
8426 the echo area in the next redisplay which doesn't preserve
8427 the echo area. */
8428 if (!display_last_displayed_message_p)
8429 message_cleared_p = 0;
8415 8430
8416 if (fonts_changed_p) 8431 if (fonts_changed_p)
8417 goto retry; 8432 goto retry;