From: Gerd Moellmann Date: Thu, 11 May 2000 12:23:55 +0000 (+0000) Subject: (read_char): Don't clear current message for help X-Git-Tag: emacs-pretest-21.0.90~3996 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1172eb8dfaf1d4a1a9f83b2c9e84d93a5de015c0;p=emacs.git (read_char): Don't clear current message for help events; let the code handling help events handle this. Change code detecting help events that should be ignored. --- diff --git a/src/ChangeLog b/src/ChangeLog index f1ee8e0db8f..3403e9f14f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2000-05-11 Gerd Moellmann + * keyboard.c (read_char): Don't clear current message for help + events; let the code handling help events handle this. Change + code detecting help events that should be ignored. + * xdisp.c (handle_single_display_prop): Don't try to set PT if we're interating over a string. diff --git a/src/keyboard.c b/src/keyboard.c index 47fb2bc5b39..990d38313f9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2534,10 +2534,14 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) Vinput_method_previous_message = previous_echo_area_message; } - /* Now wipe the echo area. */ - if (!NILP (echo_area_buffer[0])) - safe_run_hooks (Qecho_area_clear_hook); - clear_message (1, 0); + /* Now wipe the echo area, except for help events which do their + own stuff with the echo area. */ + if (!CONSP (c) || !(EQ (Qhelp_echo, XCAR (c)))) + { + if (!NILP (echo_area_buffer[0])) + safe_run_hooks (Qecho_area_clear_hook); + clear_message (1, 0); + } reread_for_input_method: from_macro: @@ -2630,21 +2634,27 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) reread_first: /* Display help if not echoing. */ - if (CONSP (c) - && EQ (XCAR (c), Qhelp_echo)) + if (CONSP (c) && EQ (XCAR (c), Qhelp_echo)) { - Lisp_Object msg = XCDR (XCDR (c)); + Lisp_Object msg; + + msg = XCDR (XCDR (c)); if (!NILP (Vshow_help_function)) call1 (Vshow_help_function, msg); - else if (!echoing && !MINI_WINDOW_P (XWINDOW (selected_window))) + else if (/* Don't overwrite minibuffer contents. */ + !MINI_WINDOW_P (XWINDOW (selected_window)) + /* Don't overwrite a keystroke echo. */ + && NILP (echo_message_buffer) + /* Don't overwrite a prompt. */ + && !cursor_in_echo_area) { if (STRINGP (msg)) message3_nolog (msg, XSTRING (msg)->size, STRING_MULTIBYTE (msg)); else message (0); } - + goto retry; }