diff options
| author | Stefan Monnier | 2000-07-05 14:08:03 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-07-05 14:08:03 +0000 |
| commit | f4d195451a38ef2fc27b5686ca5f8312b54fb8b3 (patch) | |
| tree | 88504e271804394534741103c968267c028d9673 | |
| parent | c2092eba48d5b389d8fcd83b8c47fcc9c6cfc5ee (diff) | |
| download | emacs-f4d195451a38ef2fc27b5686ca5f8312b54fb8b3.tar.gz emacs-f4d195451a38ef2fc27b5686ca5f8312b54fb8b3.zip | |
* w32menu.c (w32_menu_display_help):
* xmenu.c (menu_help_callback): Use show_help_echo.
| -rw-r--r-- | src/w32menu.c | 18 | ||||
| -rw-r--r-- | src/xmenu.c | 19 |
2 files changed, 3 insertions, 34 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index c047045ff7e..37be85c6b3b 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -2158,9 +2158,6 @@ w32_menu_display_help (HMENU menu, UINT item, UINT flags) | |||
| 2158 | 2158 | ||
| 2159 | if (get_menu_item_info) | 2159 | if (get_menu_item_info) |
| 2160 | { | 2160 | { |
| 2161 | struct gcpro gcpro1; | ||
| 2162 | extern Lisp_Object Vshow_help_function; | ||
| 2163 | Lisp_Object msg; | ||
| 2164 | MENUITEMINFO info; | 2161 | MENUITEMINFO info; |
| 2165 | 2162 | ||
| 2166 | bzero (&info, sizeof (info)); | 2163 | bzero (&info, sizeof (info)); |
| @@ -2168,19 +2165,8 @@ w32_menu_display_help (HMENU menu, UINT item, UINT flags) | |||
| 2168 | info.fMask = MIIM_DATA; | 2165 | info.fMask = MIIM_DATA; |
| 2169 | get_menu_item_info (menu, item, FALSE, &info); | 2166 | get_menu_item_info (menu, item, FALSE, &info); |
| 2170 | 2167 | ||
| 2171 | msg = info.dwItemData ? build_string ((char *) info.dwItemData) : Qnil; | 2168 | show_help_echo (info.dwItemData ? |
| 2172 | GCPRO1 (msg); | 2169 | build_string ((char *) info.dwItemData) : Qnil); |
| 2173 | |||
| 2174 | if (!NILP (Vshow_help_function)) | ||
| 2175 | call1 (Vshow_help_function, msg); | ||
| 2176 | else if (!MINI_WINDOW_P (XWINDOW (selected_window))) | ||
| 2177 | { | ||
| 2178 | if (STRINGP(msg)) | ||
| 2179 | message3_nolog (msg, XSTRING (msg)->size, STRING_MULTIBYTE (msg)); | ||
| 2180 | else | ||
| 2181 | message (0); | ||
| 2182 | } | ||
| 2183 | UNGCPRO; | ||
| 2184 | } | 2170 | } |
| 2185 | } | 2171 | } |
| 2186 | 2172 | ||
diff --git a/src/xmenu.c b/src/xmenu.c index 1cdfe3a923b..16292673df2 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -2488,24 +2488,7 @@ static void | |||
| 2488 | menu_help_callback (help_string) | 2488 | menu_help_callback (help_string) |
| 2489 | char *help_string; | 2489 | char *help_string; |
| 2490 | { | 2490 | { |
| 2491 | Lisp_Object msg; | 2491 | show_help_echo (help_string ? build_string (help_string) : Qnil); |
| 2492 | extern Lisp_Object Vshow_help_function; | ||
| 2493 | struct gcpro gcpro1; | ||
| 2494 | |||
| 2495 | msg = help_string ? build_string (help_string) : Qnil; | ||
| 2496 | GCPRO1 (msg); | ||
| 2497 | |||
| 2498 | if (!NILP (Vshow_help_function)) | ||
| 2499 | call1 (Vshow_help_function, msg); | ||
| 2500 | else if (!MINI_WINDOW_P (XWINDOW (selected_window))) | ||
| 2501 | { | ||
| 2502 | if (STRINGP (msg)) | ||
| 2503 | message3_nolog (msg, XSTRING (msg)->size, STRING_MULTIBYTE (msg)); | ||
| 2504 | else | ||
| 2505 | message (0); | ||
| 2506 | } | ||
| 2507 | |||
| 2508 | UNGCPRO; | ||
| 2509 | } | 2492 | } |
| 2510 | 2493 | ||
| 2511 | 2494 | ||