From f4d195451a38ef2fc27b5686ca5f8312b54fb8b3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 5 Jul 2000 14:08:03 +0000 Subject: [PATCH] * w32menu.c (w32_menu_display_help): * xmenu.c (menu_help_callback): Use show_help_echo. --- src/w32menu.c | 18 ++---------------- 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) if (get_menu_item_info) { - struct gcpro gcpro1; - extern Lisp_Object Vshow_help_function; - Lisp_Object msg; MENUITEMINFO info; bzero (&info, sizeof (info)); @@ -2168,19 +2165,8 @@ w32_menu_display_help (HMENU menu, UINT item, UINT flags) info.fMask = MIIM_DATA; get_menu_item_info (menu, item, FALSE, &info); - msg = info.dwItemData ? build_string ((char *) info.dwItemData) : Qnil; - GCPRO1 (msg); - - if (!NILP (Vshow_help_function)) - call1 (Vshow_help_function, msg); - else if (!MINI_WINDOW_P (XWINDOW (selected_window))) - { - if (STRINGP(msg)) - message3_nolog (msg, XSTRING (msg)->size, STRING_MULTIBYTE (msg)); - else - message (0); - } - UNGCPRO; + show_help_echo (info.dwItemData ? + build_string ((char *) info.dwItemData) : Qnil); } } 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 menu_help_callback (help_string) char *help_string; { - Lisp_Object msg; - extern Lisp_Object Vshow_help_function; - struct gcpro gcpro1; - - msg = help_string ? build_string (help_string) : Qnil; - GCPRO1 (msg); - - if (!NILP (Vshow_help_function)) - call1 (Vshow_help_function, msg); - else if (!MINI_WINDOW_P (XWINDOW (selected_window))) - { - if (STRINGP (msg)) - message3_nolog (msg, XSTRING (msg)->size, STRING_MULTIBYTE (msg)); - else - message (0); - } - - UNGCPRO; + show_help_echo (help_string ? build_string (help_string) : Qnil); } -- 2.39.2