From c4a5e7e18d357c168900215165b0cb41bad06a83 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 6 Oct 2016 21:46:48 +0300 Subject: [PATCH] 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) --- doc/emacs/screen.texi | 5 ++++- lisp/term/w32-win.el | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 580df5fe8ff..716575706cf 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -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 diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 134e3106b7b..5c56d05a140 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -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 -- 2.39.2