* doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu) <:key-sequence>:

Clarify the documentation further
This commit is contained in:
Stefan Monnier 2020-04-19 11:19:03 -04:00
parent 14a570afae
commit 5734339f40

View file

@ -2223,14 +2223,11 @@ right value for selecting that button. Clicking on the button should
set the variable so that the button you clicked on becomes selected. set the variable so that the button you clicked on becomes selected.
@item :key-sequence @var{key-sequence} @item :key-sequence @var{key-sequence}
This property specifies which key sequence is likely to be bound to the This property specifies which key sequence to display as keyboard equivalent.
same command invoked by this menu item. If you specify a correct key Before Emacs displays @var{key-sequence} in the menu, it verifies that
sequence, that sequence will be preferred over others. @var{key-sequence} is really equivalent to this menu item, so it only
has an effect if you specify a correct key sequence.
If you specify an incorrect key sequence, it has no effect; before Emacs Specifying @code{nil} for @var{key-sequence} is equivalent to the
displays @var{key-sequence} in the menu, it verifies that
@var{key-sequence} is really equivalent to this menu item. Specifying
@code{nil} for @var{key-sequence} is equivalent to the
@code{:key-sequence} attribute being absent. @code{:key-sequence} attribute being absent.
@item :keys @var{string} @item :keys @var{string}
@ -2913,17 +2910,17 @@ the following:
@table @code @table @code
@item :keys @var{keys} @item :keys @var{keys}
@var{keys} is a keyboard equivalent to the menu item (a string). This @var{keys} is a string to display as keyboard equivalent to the menu item.
is normally not needed, as keyboard equivalents are computed This is normally not needed, as keyboard equivalents are computed
automatically. @var{keys} is expanded with automatically. @var{keys} is expanded with
@code{substitute-command-keys} before it is displayed (@pxref{Keys in @code{substitute-command-keys} before it is displayed (@pxref{Keys in
Documentation}). Documentation}).
@item :key-sequence @var{keys} @item :key-sequence @var{keys}
@var{keys} is a hint for speeding up Emacs's first display of the @var{keys} is a hint indicating which key sequence to display as
menu. It should be @code{nil} if you know that the menu item has no keyboard keyboard equivalent, in case the command is bound to several key sequences.
equivalent; otherwise it should be a string or vector specifying a It has no effect if @var{keys} is not bound to same command as this
keyboard equivalent for the menu item. menu item.
@item :active @var{enable} @item :active @var{enable}
@var{enable} is an expression; if it evaluates to @code{nil}, the item @var{enable} is an expression; if it evaluates to @code{nil}, the item