Mercurial > emacs
comparison src/xdisp.c @ 38633:ae77d25eb5cc
(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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 01 Aug 2001 13:25:32 +0000 |
parents | c4f9d47715f4 |
children | c1dc55683398 |
comparison
equal
deleted
inserted
replaced
38632:0bfc95b50785 | 38633:ae77d25eb5cc |
---|---|
507 /* Non-zero means messages should be displayed with truncated | 507 /* Non-zero means messages should be displayed with truncated |
508 lines instead of being continued. */ | 508 lines instead of being continued. */ |
509 | 509 |
510 int message_truncate_lines; | 510 int message_truncate_lines; |
511 Lisp_Object Qmessage_truncate_lines; | 511 Lisp_Object Qmessage_truncate_lines; |
512 | |
513 /* Set to 1 in clear_message to make redisplay_internal aware | |
514 of an emptied echo area. */ | |
515 | |
516 static int message_cleared_p; | |
512 | 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 |
516 int cursor_in_non_selected_windows; | 521 int cursor_in_non_selected_windows; |
6893 void | 6898 void |
6894 clear_message (current_p, last_displayed_p) | 6899 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; |
6902 | 6910 |
6903 message_buf_print = 0; | 6911 message_buf_print = 0; |
8404 consider_all_windows_p = windows_or_buffers_changed = 1; | 8412 consider_all_windows_p = windows_or_buffers_changed = 1; |
8405 | 8413 |
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; |
8418 else if (window_height_changed_p) | 8433 else if (window_height_changed_p) |
8419 { | 8434 { |