Commit f4d19545 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* w32menu.c (w32_menu_display_help):

* xmenu.c (menu_help_callback): Use show_help_echo.
parent c2092eba
......@@ -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);
}
}
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment