*** A new format for menu items is supported.
In a keymap, a key binding that has the format
(STRING . REAL-BINDING) or (STRING HELP-STRING . REAL-BINDING)
defines a menu item. Now a menu item definition may also be a list that
starts with the symbol `menu-item'.
The format is: (menu-item ITEM-NAME) or (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST) where ITEM-NAME is an expression which evaluates to the menu item string, and ITEM-PROPERTY-LIST has the form of a property list. The supported properties include
:enable FORM Evaluate FORM to determine whether the item is enabled. :visible FORM Evaluate FORM to determine whether the item should appear in the menu. :filter FILTER-FN FILTER-FN is a function of one argument, which will be REAL-BINDING. It should return a binding to use instead. :keys DESCRIPTION DESCRIPTION is a string that describes an equivalent keyboard binding for for REAL-BINDING. DESCRIPTION is expanded with `substitute-command-keys' before it is used. :key-sequence KEY-SEQUENCE KEY-SEQUENCE is a key-sequence for an equivalent keyboard binding. :key-sequence nil This means that the command normally has no keyboard equivalent. :help HELP HELP is the extra help string (not currently used). :button (TYPE . SELECTED) TYPE is :toggle or :radio. SELECTED is a form, to be evaluated, and its value says whether this button is currently selected.
Buttons are at the moment only simulated by prefixes in the menu. Eventually ordinary X-buttons may be supported.
(menu-item ITEM-NAME) defines unselectable item.