- 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;
+ extern Lisp_Object Qmenu_item;
+ Lisp_Object *first_item;
+ Lisp_Object pane_name;
+ Lisp_Object menu_object;
+
+ first_item = XVECTOR (menu_items)->contents;
+ if (EQ (first_item[0], Qt))
+ pane_name = first_item[MENU_ITEMS_PANE_NAME];
+ else if (EQ (first_item[0], Qquote))
+ /* This shouldn't happen, see xmenu_show. */
+ pane_name = build_string ("");
+ else
+ pane_name = first_item[MENU_ITEMS_ITEM_NAME];
+
+ /* (menu-item MENU-NAME PANE-NUMBER) */
+ menu_object = Fcons (Qmenu_item,
+ Fcons (pane_name,
+ Fcons (make_number (pane), Qnil)));
+ show_help_echo (help_string ? build_string (help_string) : Qnil,
+ Qnil, menu_object, make_number (item), 1);