Improve documentation of 'menu-bar-open'

* lisp/term/w32-win.el (w32-menu-bar-open): Clarify that sometimes
two ESC keypresses are needed to exit the menu.

* doc/emacs/screen.texi (Menu Bar): Qualify the description of how
to exit menus.  (Bug#24596)
This commit is contained in:
Eli Zaretskii 2016-10-06 21:46:48 +03:00
parent 34b6df19a4
commit c4a5e7e18d
2 changed files with 9 additions and 3 deletions

View file

@ -304,7 +304,10 @@ the usual way (@pxref{Key Help}).
item by pressing @key{F10} (to run the command @code{menu-bar-open}).
You can then navigate the menus with the arrow keys. To activate a
selected menu item, press @key{RET}; to cancel menu navigation, press
@kbd{C-g} or @kbd{@key{ESC} @key{ESC} @key{ESC}}.
@kbd{C-g} or @kbd{@key{ESC} @key{ESC} @key{ESC}}. (However, note that
when Emacs was built with a GUI toolkit, the menus are drawn and
controlled by the toolkit, and the key sequences to cancel menu
navigation might be different from the above description.)
@kindex M-`
@findex tmm-menubar

View file

@ -177,12 +177,15 @@ the last file dropped is selected."
;;; make f10 activate the real menubar rather than the mini-buffer menu
;;; navigation feature.
(defun w32-menu-bar-open (&optional frame)
(defun w32-menu-bar-open (&optional frame)
"Start key navigation of the menu bar in FRAME.
This initially activates the first menu-bar item, and you can then navigate
with the arrow keys, select a menu entry with the Return key or cancel with
the Escape key. If FRAME has no menu bar, this function does nothing.
one or two Escape keypresses. (Two Escape keypresses are needed when a
menu was already dropped down by pressing Return.)
If FRAME has no menu bar, this function does nothing.
If FRAME is nil or not given, use the selected frame.
If FRAME does not have the menu bar enabled, display a text menu using