Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
493a1978
Commit
493a1978
authored
Oct 08, 2013
by
Eli Zaretskii
Browse files
Make tty-menu-open-use-tmm a defcustom, update tmm docs accordingly.
parent
1f16a64c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
lisp/menu-bar.el
lisp/menu-bar.el
+10
-3
lisp/tmm.el
lisp/tmm.el
+5
-1
src/menu.c
src/menu.c
+4
-1
No files found.
lisp/menu-bar.el
View file @
493a1978
...
...
@@ -2340,9 +2340,16 @@ If nil, the current mouse position is used."
"Keymap used while processing TTY menus."
)
;; FIXME: Make this a defcustom!
(defvar tty-menu-open-use-tmm nil
"If non-nil, menu-bar-open on a TTY will invoke `tmm-menubar'.")
(
defcustom
tty-menu-open-use-tmm
nil
"If non-nil, \\[menu-bar-open] on a TTY will invoke `tmm-menubar'.
If nil, \\[menu-bar-open] will drop down the menu corresponding to the
first (leftmost) menu-bar item; you can select other items by typing
\\[forward-char], \\[backward-char], \\[right-char] and \\[left-char]."
:type
'
(
choice
(
const
:tag
"F10 drops down TTY menus"
nil
)
(
const
:tag
"F10 invokes tmm-menubar"
t
))
:group
'display
:version
"24.4"
)
(
defvar
tty-menu--initial-menu-x
10
"X coordinate of the first menu-bar menu dropped by F10.
...
...
lisp/tmm.el
View file @
493a1978
...
...
@@ -50,7 +50,11 @@
"Text-mode emulation of looking and choosing from a menubar.
See the documentation for `tmm-prompt'.
X-POSITION, if non-nil, specifies a horizontal position within the menu bar;
we make that menu bar item (the one at that position) the default choice."
we make that menu bar item (the one at that position) the default choice.
Note that \\[menu-bar-open] by default drops down TTY menus; if you want it
to invoke `tmm-menubar' instead, customize the variable
\`tty-menu-open-use-tmm' to a non-nil value."
(
interactive
)
(
run-hooks
'menu-bar-update-hook
)
;; Obey menu-bar-final-items; put those items last.
...
...
src/menu.c
View file @
493a1978
...
...
@@ -1064,7 +1064,10 @@ Value is the symbol of the menu at X/Y, or nil if the specified
coordinates are not within the FRAME's menu bar. The symbol can
be used to look up the menu like this:
(lookup-key global-map [menu-bar SYMBOL])
(lookup-key MAP [menu-bar SYMBOL])
where MAP is either the current global map or the current local map,
since menu-bar items come from both.
This function can return non-nil only on a text-terminal frame
or on an X frame that doesn't use any GUI toolkit. Otherwise,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment