diff options
author | Eli Zaretskii <[email protected]> | 2013-10-11 21:20:08 +0300 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2013-10-11 21:20:08 +0300 |
commit | f747170fc54597266342d36a7438ac9bfb6f179b (patch) | |
tree | bf2b45573fd56462675569a6c2d6a54054c82408 /lisp | |
parent | 029619c86b55876f2feaff55df1e8538f3c092d1 (diff) |
Fix popping down a menu by a second mouse click.
lisp/menu-bar.el (tty-menu-navigation-map): Bind all menu-bar
sequences to tty-menu-exit -- this pops down a dropped menu on
second mouse click on the menu bar.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/menu-bar.el | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de3dfbc7cf..3de056a26d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,8 @@ 2013-10-11 Eli Zaretskii <[email protected]> * menu-bar.el (tty-menu-navigation-map): Remap F10 to tty-menu-exit. + Bind all menu-bar sequences to tty-menu-exit -- this pops down a + dropped menu on second mouse click on the menu bar. 2013-10-11 Stefan Monnier <[email protected]> diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 6c152c4920..43937d0390 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2333,16 +2333,7 @@ If FRAME is nil or not given, use the selected frame." ;; The bindings of menu-bar items are so that clicking on the menu ;; bar when a menu is already shown pops down that menu. - ;; FIXME: we should iterate over all the visible menu-bar items, - ;; instead of naming them explicitly here. Also, this doesn't - ;; include items added by current major mode. - ;; - ;; FIXME: Why not (define-key map [menu-bat t] 'tty-menu-exit) ? --Stef - (dolist (event '(file edit options buffer tools help-menu)) - (substitute-key-definition - (lookup-key (current-global-map) (vector 'menu-bar event)) - 'tty-menu-exit - map (current-global-map))) + (define-key map [menu-bar t] 'tty-menu-exit) (define-key map [?\C-r] 'tty-menu-select) (define-key map [?\C-j] 'tty-menu-select) |