+You've probably noticed that menu items show the equivalent keyboard key
+sequence (if any) to invoke the same command. To save time on
+recalculation, menu display caches this information in a sublist in the
+binding, like this:
+
+@c This line is not too long--rms.
+@example
+(@var{item-string} @r{[}@var{help-string}@r{]} (@var{key-binding-data}) . @var{real-binding})
+@end example
+
+@noindent
+Don't put these sublists in the menu item yourself; menu display
+calculates them automatically. Don't mention keyboard equivalents in
+the item strings themselves, since that is redundant.
+
+@node Extended Menu Items
+@subsubsection Extended Menu Items
+@kindex menu-item
+
+ An extended-format menu item is a more flexible and also cleaner
+alternative to the simple format. It consists of a list that starts
+with the symbol @code{menu-item}. To define a non-selectable string,
+the item looks like this:
+
+@example
+(menu-item @var{item-name})
+@end example
+
+@noindent
+A string starting with two or more dashes specifies a separator line;
+see @ref{Menu Separators}.
+
+ To define a real menu item which can be selected, the extended format
+item looks like this:
+
+@example
+(menu-item @var{item-name} @var{real-binding}
+ . @var{item-property-list})
+@end example
+
+@noindent
+Here, @var{item-name} is an expression which evaluates to the menu item
+string. Thus, the string need not be a constant. The third element,
+@var{real-binding}, is the command to execute. The tail of the list,
+@var{item-property-list}, has the form of a property list which contains
+other information. Here is a table of the properties that are supported:
+
+@table @code
+@item :enable @var{form}
+The result of evaluating @var{form} determines whether the item is
+enabled (non-@code{nil} means yes). If the item is not enabled,
+you can't really click on it.
+
+@item :visible @var{form}
+The result of evaluating @var{form} determines whether the item should
+actually appear in the menu (non-@code{nil} means yes). If the item
+does not appear, then the menu is displayed as if this item were
+not defined at all.
+
+@item :help @var{help}
+The value of this property, @var{help}, specifies a ``help-echo'' string
+to display while the mouse is on that item. This is displayed in the
+same way as @code{help-echo} text properties (@pxref{Help display}).
+Note that this must be a constant string, unlike the @code{help-echo}
+property for text and overlays.
+
+@item :button (@var{type} . @var{selected})
+This property provides a way to define radio buttons and toggle buttons.
+The @sc{car}, @var{type}, says which: it should be @code{:toggle} or
+@code{:radio}. The @sc{cdr}, @var{selected}, should be a form; the
+result of evaluating it says whether this button is currently selected.
+
+A @dfn{toggle} is a menu item which is labeled as either ``on'' or ``off''
+according to the value of @var{selected}. The command itself should
+toggle @var{selected}, setting it to @code{t} if it is @code{nil},
+and to @code{nil} if it is @code{t}. Here is how the menu item
+to toggle the @code{debug-on-error} flag is defined:
+
+@example
+(menu-item "Debug on Error" toggle-debug-on-error
+ :button (:toggle
+ . (and (boundp 'debug-on-error)
+ debug-on-error)))
+@end example
+
+@noindent
+This works because @code{toggle-debug-on-error} is defined as a command
+which toggles the variable @code{debug-on-error}.
+
+@dfn{Radio buttons} are a group of menu items, in which at any time one
+and only one is ``selected.'' There should be a variable whose value
+says which one is selected at any time. The @var{selected} form for
+each radio button in the group should check whether the variable has the
+right value for selecting that button. Clicking on the button should
+set the variable so that the button you clicked on becomes selected.
+
+@item :key-sequence @var{key-sequence}
+This property specifies which key sequence is likely to be bound to the
+same command invoked by this menu item. If you specify the right key
+sequence, that makes preparing the menu for display run much faster.
+
+If you specify the wrong key sequence, it has no effect; before Emacs
+displays @var{key-sequence} in the menu, it verifies that
+@var{key-sequence} is really equivalent to this menu item.
+
+@item :key-sequence nil
+This property indicates that there is normally no key binding which is
+equivalent to this menu item. Using this property saves time in
+preparing the menu for display, because Emacs does not need to search
+the keymaps for a keyboard equivalent for this menu item.
+
+However, if the user has rebound this item's definition to a key
+sequence, Emacs ignores the @code{:keys} property and finds the keyboard
+equivalent anyway.
+
+@item :keys @var{string}
+This property specifies that @var{string} is the string to display
+as the keyboard equivalent for this menu item. You can use
+the @samp{\\[...]} documentation construct in @var{string}.
+
+@item :filter @var{filter-fn}
+This property provides a way to compute the menu item dynamically.
+The property value @var{filter-fn} should be a function of one argument;
+when it is called, its argument will be @var{real-binding}. The
+function should return the binding to use instead.
+@end table
+
+@node Menu Separators
+@subsubsection Menu Separators
+@cindex menu separators
+
+ A menu separator is a kind of menu item that doesn't display any
+text---instead, it divides the menu into subparts with a horizontal line.
+A separator looks like this in the menu keymap:
+
+@example
+(menu-item @var{separator-type})
+@end example
+
+@noindent
+where @var{separator-type} is a string starting with two or more dashes.
+
+ In the simplest case, @var{separator-type} consists of only dashes.
+That specifies the default kind of separator. (For compatibility,
+@code{""} and @code{-} also count as separators.)
+
+ Starting in Emacs 21, certain other values of @var{separator-type}
+specify a different style of separator. Here is a table of them:
+
+@table @code
+@item "--no-line"
+@itemx "--space"
+An extra vertical space, with no actual line.
+
+@item "--single-line"
+A single line in the menu's foreground color.
+
+@item "--double-line"
+A double line in the menu's foreground color.
+
+@item "--single-dashed-line"
+A single dashed line in the menu's foreground color.
+
+@item "--double-dashed-line"
+A double dashed line in the menu's foreground color.
+
+@item "--shadow-etched-in"
+A single line with a 3D sunken appearance. This is the default,
+used separators consisting of dashes only.
+
+@item "--shadow-etched-out"
+A single line with a 3D raised appearance.
+
+@item "--shadow-etched-in-dash"
+A single dashed line with a 3D sunken appearance.
+
+@item "--shadow-etched-out-dash"
+A single dashed line with a 3D raised appearance.
+
+@item "--shadow-double-etched-in"
+Two lines with a 3D sunken appearance.
+
+@item "--shadow-double-etched-out"
+Two lines with a 3D raised appearance.
+
+@item "--shadow-double-etched-in-dash"
+Two dashed lines with a 3D sunken appearance.
+
+@item "--shadow-double-etched-out-dash"
+Two dashed lines with a 3D raised appearance.
+@end table
+
+ You can also give these names in another style, adding a colon after
+the double-dash and replacing each single dash with capitalization of
+the following word. Thus, @code{"--:singleLine"}, is equivalent to
+@code{"--single-line"}.
+
+ Some systems and display toolkits don't really handle all of these
+separator types. If you use a type that isn't supported, the menu
+displays a similar kind of separator that is supported.
+
+@node Alias Menu Items
+@subsubsection Alias Menu Items
+
+ Sometimes it is useful to make menu items that use the ``same''
+command but with different enable conditions. The best way to do this
+in Emacs now is with extended menu items; before that feature existed,
+it could be done by defining alias commands and using them in menu
+items. Here's an example that makes two aliases for