diff options
| author | Jérémy Compostella | 2012-05-07 12:09:51 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-05-07 12:09:51 -0400 |
| commit | b120cc17aede4b15b4d6737f03e936a621e72962 (patch) | |
| tree | dbea6eb7617ab67ac84d00272e76cc408a8e8b52 /src | |
| parent | 9a4b36f891acd6e620c1d7e6f3fcedc368003ee7 (diff) | |
| download | emacs-b120cc17aede4b15b4d6737f03e936a621e72962.tar.gz emacs-b120cc17aede4b15b4d6737f03e936a621e72962.zip | |
Fix up display of the *Minibuf-0* buffer in the mini window.
* src/keyboard.c (read_char): Don't clear the echo area if there's no
message to clear.
* src/xdisp.c (redisplay_internal): Redisplay the mini window (with the
contents of *Minibuf-0*) if there' no message displayed in its stead.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/keyboard.c | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 18 |
3 files changed, 27 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fcf5ef976ff..3a9e9a5f539 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com> | ||
| 2 | |||
| 3 | Fix up display of the *Minibuf-0* buffer in the mini window. | ||
| 4 | * keyboard.c (read_char): Don't clear the echo area if there's no | ||
| 5 | message to clear. | ||
| 6 | * xdisp.c (redisplay_internal): Redisplay the mini window (with the | ||
| 7 | contents of *Minibuf-0*) if there' no message displayed in its stead. | ||
| 8 | |||
| 1 | 2012-05-07 Michael Albinus <michael.albinus@gmx.de> | 9 | 2012-05-07 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 10 | ||
| 3 | * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in | 11 | * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in |
diff --git a/src/keyboard.c b/src/keyboard.c index 249e5ee9544..fcd5c0e6837 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2996,8 +2996,10 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, | |||
| 2996 | && !(EQ (Qselect_window, XCAR (c))))) | 2996 | && !(EQ (Qselect_window, XCAR (c))))) |
| 2997 | { | 2997 | { |
| 2998 | if (!NILP (echo_area_buffer[0])) | 2998 | if (!NILP (echo_area_buffer[0])) |
| 2999 | safe_run_hooks (Qecho_area_clear_hook); | 2999 | { |
| 3000 | clear_message (1, 0); | 3000 | safe_run_hooks (Qecho_area_clear_hook); |
| 3001 | clear_message (1, 0); | ||
| 3002 | } | ||
| 3001 | } | 3003 | } |
| 3002 | 3004 | ||
| 3003 | reread_for_input_method: | 3005 | reread_for_input_method: |
diff --git a/src/xdisp.c b/src/xdisp.c index da44281a55e..eaad5455212 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12727,6 +12727,9 @@ redisplay_internal (void) | |||
| 12727 | frames. Zero means, only selected_window is considered. */ | 12727 | frames. Zero means, only selected_window is considered. */ |
| 12728 | int consider_all_windows_p; | 12728 | int consider_all_windows_p; |
| 12729 | 12729 | ||
| 12730 | /* Non-zero means redisplay has to redisplay the miniwindow */ | ||
| 12731 | int update_miniwindow_p = 0; | ||
| 12732 | |||
| 12730 | TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p)); | 12733 | TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p)); |
| 12731 | 12734 | ||
| 12732 | /* No redisplay if running in batch mode or frame is not yet fully | 12735 | /* No redisplay if running in batch mode or frame is not yet fully |
| @@ -12913,6 +12916,10 @@ redisplay_internal (void) | |||
| 12913 | && !MINI_WINDOW_P (XWINDOW (selected_window)))) | 12916 | && !MINI_WINDOW_P (XWINDOW (selected_window)))) |
| 12914 | { | 12917 | { |
| 12915 | int window_height_changed_p = echo_area_display (0); | 12918 | int window_height_changed_p = echo_area_display (0); |
| 12919 | |||
| 12920 | if (message_cleared_p) | ||
| 12921 | update_miniwindow_p = 1; | ||
| 12922 | |||
| 12916 | must_finish = 1; | 12923 | must_finish = 1; |
| 12917 | 12924 | ||
| 12918 | /* If we don't display the current message, don't clear the | 12925 | /* If we don't display the current message, don't clear the |
| @@ -12949,7 +12956,7 @@ redisplay_internal (void) | |||
| 12949 | /* FIXME: this causes all frames to be updated, which seems unnecessary | 12956 | /* FIXME: this causes all frames to be updated, which seems unnecessary |
| 12950 | since only the current frame needs to be considered. This function needs | 12957 | since only the current frame needs to be considered. This function needs |
| 12951 | to be rewritten with two variables, consider_all_windows and | 12958 | to be rewritten with two variables, consider_all_windows and |
| 12952 | consider_all_frames. */ | 12959 | consider_all_frames. */ |
| 12953 | consider_all_windows_p = 1; | 12960 | consider_all_windows_p = 1; |
| 12954 | ++windows_or_buffers_changed; | 12961 | ++windows_or_buffers_changed; |
| 12955 | ++update_mode_lines; | 12962 | ++update_mode_lines; |
| @@ -13135,7 +13142,8 @@ redisplay_internal (void) | |||
| 13135 | then we can't just move the cursor. */ | 13142 | then we can't just move the cursor. */ |
| 13136 | else if (! (!NILP (Vtransient_mark_mode) | 13143 | else if (! (!NILP (Vtransient_mark_mode) |
| 13137 | && !NILP (BVAR (current_buffer, mark_active))) | 13144 | && !NILP (BVAR (current_buffer, mark_active))) |
| 13138 | && (EQ (selected_window, BVAR (current_buffer, last_selected_window)) | 13145 | && (EQ (selected_window, |
| 13146 | BVAR (current_buffer, last_selected_window)) | ||
| 13139 | || highlight_nonselected_windows) | 13147 | || highlight_nonselected_windows) |
| 13140 | && NILP (w->region_showing) | 13148 | && NILP (w->region_showing) |
| 13141 | && NILP (Vshow_trailing_whitespace) | 13149 | && NILP (Vshow_trailing_whitespace) |
| @@ -13288,7 +13296,7 @@ redisplay_internal (void) | |||
| 13288 | } | 13296 | } |
| 13289 | else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) | 13297 | else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) |
| 13290 | { | 13298 | { |
| 13291 | Lisp_Object mini_window; | 13299 | Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf); |
| 13292 | struct frame *mini_frame; | 13300 | struct frame *mini_frame; |
| 13293 | 13301 | ||
| 13294 | displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); | 13302 | displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); |
| @@ -13297,6 +13305,10 @@ redisplay_internal (void) | |||
| 13297 | internal_condition_case_1 (redisplay_window_1, selected_window, | 13305 | internal_condition_case_1 (redisplay_window_1, selected_window, |
| 13298 | list_of_error, | 13306 | list_of_error, |
| 13299 | redisplay_window_error); | 13307 | redisplay_window_error); |
| 13308 | if (update_miniwindow_p) | ||
| 13309 | internal_condition_case_1 (redisplay_window_1, mini_window, | ||
| 13310 | list_of_error, | ||
| 13311 | redisplay_window_error); | ||
| 13300 | 13312 | ||
| 13301 | /* Compare desired and current matrices, perform output. */ | 13313 | /* Compare desired and current matrices, perform output. */ |
| 13302 | 13314 | ||