diff options
| author | Stefan Monnier | 2008-04-19 19:30:53 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-04-19 19:30:53 +0000 |
| commit | ece5f84750f297572c9ecacc0d09bd9418017b2c (patch) | |
| tree | cac489f8c4ae280cd1cecfb95a75932ac16c992e /src | |
| parent | 59ae30492b4fe8a7245061b580b7092ce22eb77f (diff) | |
| download | emacs-ece5f84750f297572c9ecacc0d09bd9418017b2c.tar.gz emacs-ece5f84750f297572c9ecacc0d09bd9418017b2c.zip | |
* tooltip.el (tooltip-previous-message): New var.
(tooltip-show-help-non-mode): Rewrite to better follow the behavior of the
C code (avoid overwriting a minibuffer, restore previous echo message, ...).
(tooltip-delay, tooltip-process-prompt-regexp, tooltip-strip-prompt): Simplify.
* keyboard.c (Vpre_help_message): Remove.
(show_help_echo): Remove default C code.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/keyboard.c | 39 |
2 files changed, 3 insertions, 39 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2afb3a412b3..b23dd2ecea2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2008-04-19 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-04-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * keyboard.c (Vpre_help_message): Remove. | ||
| 4 | (show_help_echo): Remove default C code. | ||
| 5 | |||
| 3 | * dired.c (directory_files_internal, file_name_completion): | 6 | * dired.c (directory_files_internal, file_name_completion): |
| 4 | Only call ENCODE_FILE if the string is indeed decoded. | 7 | Only call ENCODE_FILE if the string is indeed decoded. |
| 5 | 8 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 64427992a83..6e7bcca3ca3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -157,11 +157,6 @@ extern int message_enable_multibyte; | |||
| 157 | 157 | ||
| 158 | Lisp_Object Vshow_help_function; | 158 | Lisp_Object Vshow_help_function; |
| 159 | 159 | ||
| 160 | /* If a string, the message displayed before displaying a help-echo | ||
| 161 | in the echo area. */ | ||
| 162 | |||
| 163 | Lisp_Object Vpre_help_message; | ||
| 164 | |||
| 165 | /* Nonzero means do menu prompting. */ | 160 | /* Nonzero means do menu prompting. */ |
| 166 | 161 | ||
| 167 | static int menu_prompting; | 162 | static int menu_prompting; |
| @@ -2458,37 +2453,6 @@ show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo) | |||
| 2458 | { | 2453 | { |
| 2459 | if (!NILP (Vshow_help_function)) | 2454 | if (!NILP (Vshow_help_function)) |
| 2460 | call1 (Vshow_help_function, help); | 2455 | call1 (Vshow_help_function, help); |
| 2461 | else if (/* Don't overwrite minibuffer contents. */ | ||
| 2462 | !MINI_WINDOW_P (XWINDOW (selected_window)) | ||
| 2463 | /* Don't overwrite a keystroke echo. */ | ||
| 2464 | && (NILP (echo_message_buffer) | ||
| 2465 | || ok_to_overwrite_keystroke_echo) | ||
| 2466 | /* Don't overwrite a prompt. */ | ||
| 2467 | && !cursor_in_echo_area) | ||
| 2468 | { | ||
| 2469 | if (STRINGP (help)) | ||
| 2470 | { | ||
| 2471 | int count = SPECPDL_INDEX (); | ||
| 2472 | |||
| 2473 | if (!help_echo_showing_p) | ||
| 2474 | Vpre_help_message = current_message (); | ||
| 2475 | |||
| 2476 | specbind (Qmessage_truncate_lines, Qt); | ||
| 2477 | message3_nolog (help, SBYTES (help), | ||
| 2478 | STRING_MULTIBYTE (help)); | ||
| 2479 | unbind_to (count, Qnil); | ||
| 2480 | } | ||
| 2481 | else if (STRINGP (Vpre_help_message)) | ||
| 2482 | { | ||
| 2483 | message3_nolog (Vpre_help_message, | ||
| 2484 | SBYTES (Vpre_help_message), | ||
| 2485 | STRING_MULTIBYTE (Vpre_help_message)); | ||
| 2486 | Vpre_help_message = Qnil; | ||
| 2487 | } | ||
| 2488 | else | ||
| 2489 | message (0); | ||
| 2490 | } | ||
| 2491 | |||
| 2492 | help_echo_showing_p = STRINGP (help); | 2456 | help_echo_showing_p = STRINGP (help); |
| 2493 | } | 2457 | } |
| 2494 | } | 2458 | } |
| @@ -11753,9 +11717,6 @@ syms_of_keyboard () | |||
| 11753 | { | 11717 | { |
| 11754 | pending_funcalls = Qnil; | 11718 | pending_funcalls = Qnil; |
| 11755 | 11719 | ||
| 11756 | Vpre_help_message = Qnil; | ||
| 11757 | staticpro (&Vpre_help_message); | ||
| 11758 | |||
| 11759 | Vlispy_mouse_stem = build_string ("mouse"); | 11720 | Vlispy_mouse_stem = build_string ("mouse"); |
| 11760 | staticpro (&Vlispy_mouse_stem); | 11721 | staticpro (&Vlispy_mouse_stem); |
| 11761 | 11722 | ||