aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-10-11 21:20:08 +0300
committerEli Zaretskii2013-10-11 21:20:08 +0300
commitf747170fc54597266342d36a7438ac9bfb6f179b (patch)
treebf2b45573fd56462675569a6c2d6a54054c82408
parent029619c86b55876f2feaff55df1e8538f3c092d1 (diff)
downloademacs-f747170fc54597266342d36a7438ac9bfb6f179b.tar.gz
emacs-f747170fc54597266342d36a7438ac9bfb6f179b.zip
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.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/menu-bar.el11
2 files changed, 3 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index de3dfbc7cf7..3de056a26d3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,8 @@
12013-10-11 Eli Zaretskii <eliz@gnu.org> 12013-10-11 Eli Zaretskii <eliz@gnu.org>
2 2
3 * menu-bar.el (tty-menu-navigation-map): Remap F10 to tty-menu-exit. 3 * menu-bar.el (tty-menu-navigation-map): Remap F10 to tty-menu-exit.
4 Bind all menu-bar sequences to tty-menu-exit -- this pops down a
5 dropped menu on second mouse click on the menu bar.
4 6
52013-10-11 Stefan Monnier <monnier@iro.umontreal.ca> 72013-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
6 8
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 6c152c49208..43937d03905 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."
2333 2333
2334 ;; The bindings of menu-bar items are so that clicking on the menu 2334 ;; The bindings of menu-bar items are so that clicking on the menu
2335 ;; bar when a menu is already shown pops down that menu. 2335 ;; bar when a menu is already shown pops down that menu.
2336 ;; FIXME: we should iterate over all the visible menu-bar items, 2336 (define-key map [menu-bar t] 'tty-menu-exit)
2337 ;; instead of naming them explicitly here. Also, this doesn't
2338 ;; include items added by current major mode.
2339 ;;
2340 ;; FIXME: Why not (define-key map [menu-bat t] 'tty-menu-exit) ? --Stef
2341 (dolist (event '(file edit options buffer tools help-menu))
2342 (substitute-key-definition
2343 (lookup-key (current-global-map) (vector 'menu-bar event))
2344 'tty-menu-exit
2345 map (current-global-map)))
2346 2337
2347 (define-key map [?\C-r] 'tty-menu-select) 2338 (define-key map [?\C-r] 'tty-menu-select)
2348 (define-key map [?\C-j] 'tty-menu-select) 2339 (define-key map [?\C-j] 'tty-menu-select)