diff options
| author | Eli Zaretskii | 2013-10-08 12:01:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-10-08 12:01:26 +0300 |
| commit | 493a197846a4483f21605950e6214e42ecb6fc62 (patch) | |
| tree | ec51ee62682fc09d215ee3f9e42c23278f995f8b | |
| parent | 1f16a64c411543673ff5ce3e7f52df549ec356e3 (diff) | |
| download | emacs-493a197846a4483f21605950e6214e42ecb6fc62.tar.gz emacs-493a197846a4483f21605950e6214e42ecb6fc62.zip | |
Make tty-menu-open-use-tmm a defcustom, update tmm docs accordingly.
| -rw-r--r-- | lisp/menu-bar.el | 13 | ||||
| -rw-r--r-- | lisp/tmm.el | 6 | ||||
| -rw-r--r-- | src/menu.c | 5 |
3 files changed, 19 insertions, 5 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 41a02019039..400c65e505b 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -2340,9 +2340,16 @@ If nil, the current mouse position is used." | |||
| 2340 | "Keymap used while processing TTY menus.") | 2340 | "Keymap used while processing TTY menus.") |
| 2341 | 2341 | ||
| 2342 | 2342 | ||
| 2343 | ;; FIXME: Make this a defcustom! | 2343 | (defcustom tty-menu-open-use-tmm nil |
| 2344 | (defvar tty-menu-open-use-tmm nil | 2344 | "If non-nil, \\[menu-bar-open] on a TTY will invoke `tmm-menubar'. |
| 2345 | "If non-nil, menu-bar-open on a TTY will invoke `tmm-menubar'.") | 2345 | |
| 2346 | If nil, \\[menu-bar-open] will drop down the menu corresponding to the | ||
| 2347 | first (leftmost) menu-bar item; you can select other items by typing | ||
| 2348 | \\[forward-char], \\[backward-char], \\[right-char] and \\[left-char]." | ||
| 2349 | :type '(choice (const :tag "F10 drops down TTY menus" nil) | ||
| 2350 | (const :tag "F10 invokes tmm-menubar" t)) | ||
| 2351 | :group 'display | ||
| 2352 | :version "24.4") | ||
| 2346 | 2353 | ||
| 2347 | (defvar tty-menu--initial-menu-x 10 | 2354 | (defvar tty-menu--initial-menu-x 10 |
| 2348 | "X coordinate of the first menu-bar menu dropped by F10. | 2355 | "X coordinate of the first menu-bar menu dropped by F10. |
diff --git a/lisp/tmm.el b/lisp/tmm.el index cd91742649d..36c11a0f4b0 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el | |||
| @@ -50,7 +50,11 @@ | |||
| 50 | "Text-mode emulation of looking and choosing from a menubar. | 50 | "Text-mode emulation of looking and choosing from a menubar. |
| 51 | See the documentation for `tmm-prompt'. | 51 | See the documentation for `tmm-prompt'. |
| 52 | X-POSITION, if non-nil, specifies a horizontal position within the menu bar; | 52 | X-POSITION, if non-nil, specifies a horizontal position within the menu bar; |
| 53 | we make that menu bar item (the one at that position) the default choice." | 53 | we make that menu bar item (the one at that position) the default choice. |
| 54 | |||
| 55 | Note that \\[menu-bar-open] by default drops down TTY menus; if you want it | ||
| 56 | to invoke `tmm-menubar' instead, customize the variable | ||
| 57 | \`tty-menu-open-use-tmm' to a non-nil value." | ||
| 54 | (interactive) | 58 | (interactive) |
| 55 | (run-hooks 'menu-bar-update-hook) | 59 | (run-hooks 'menu-bar-update-hook) |
| 56 | ;; Obey menu-bar-final-items; put those items last. | 60 | ;; Obey menu-bar-final-items; put those items last. |
diff --git a/src/menu.c b/src/menu.c index 447faf60b1f..2c787e00b6f 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -1064,7 +1064,10 @@ Value is the symbol of the menu at X/Y, or nil if the specified | |||
| 1064 | coordinates are not within the FRAME's menu bar. The symbol can | 1064 | coordinates are not within the FRAME's menu bar. The symbol can |
| 1065 | be used to look up the menu like this: | 1065 | be used to look up the menu like this: |
| 1066 | 1066 | ||
| 1067 | (lookup-key global-map [menu-bar SYMBOL]) | 1067 | (lookup-key MAP [menu-bar SYMBOL]) |
| 1068 | |||
| 1069 | where MAP is either the current global map or the current local map, | ||
| 1070 | since menu-bar items come from both. | ||
| 1068 | 1071 | ||
| 1069 | This function can return non-nil only on a text-terminal frame | 1072 | This function can return non-nil only on a text-terminal frame |
| 1070 | or on an X frame that doesn't use any GUI toolkit. Otherwise, | 1073 | or on an X frame that doesn't use any GUI toolkit. Otherwise, |