}
DEFUN ("popup-menu", Fpopup_menu, 1, 2, 0, /*
-Pop up the given menu.
+Pop up the menu described by MENU-DESCRIPTION.
A menu description is a list of menu items, strings, and submenus.
The first element of a menu must be a string, which is the name of the menu.
See menubar.el for many more examples.
*/
- (menu_desc, event))
+ (menu_description, event))
{
- struct frame *f = decode_frame(Qnil);
- MAYBE_FRAMEMETH (f, popup_menu, (menu_desc,event));
+ struct frame *f = decode_frame (Qnil);
+ MAYBE_FRAMEMETH (f, popup_menu, (menu_description, event));
return Qnil;
}
INC_CHARPTR (name_data);
}
+ if (string_result_ptr - string_result == XSTRING_LENGTH (name)
+ && !memcmp (string_result, XSTRING_DATA (name), XSTRING_LENGTH (name)))
+ return name;
+
return make_string (string_result, string_result_ptr - string_result);
}
:included (memq symbol menubar-configuration)
See the variable `menubar-configuration'.
- :filter <function> A menu filter can only be used in a menu item list.
- (i.e. not in a menu item itself). It is used to
+ :filter <function> A menu filter can only be used at the beginning of a
+ submenu description (i.e. not in a menu item itself).
+ (Remember that most of the keywords can take evaluated
+ expressions as well as constants.) The filter is used to
incrementally create a submenu only when it is selected
by the user and not every time the menubar is activated.
The filter function is passed the list of menu items in
- the submenu and must return a list of menu items to be
- used for the menu. It must not destructively modify
+ the submenu and must return the modified list to be
+ actually used. The filter MUST NOT destructively modify
the list of menu items passed to it. It is called only
when the menu is about to be displayed, so other menus
may already be displayed. Vile and terrible things will
:key-sequence keys Used in FSF Emacs as an hint to an equivalent keybinding.
Ignored by XEmacs for easymenu.el compatibility.
+ (XEmacs computes this information automatically.)
For example:
*/ );
Fprovide (intern ("menubar"));
+ Fprovide (intern ("menu-accelerator-support"));
}
void
offsetof (struct window, menubar_visible_p),
menubar_visible_p_changed,
offsetof (struct frame, menubar_visible_p),
- menubar_visible_p_changed_in_frame);
+ menubar_visible_p_changed_in_frame, 0);
}
void