]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix popping down a menu by a second mouse click.
authorEli Zaretskii <eliz@gnu.org>
Fri, 11 Oct 2013 18:20:08 +0000 (21:20 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 11 Oct 2013 18:20:08 +0000 (21:20 +0300)
 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.

lisp/ChangeLog
lisp/menu-bar.el

index de3dfbc7cf7f659ec5e02c6171f387703399b40b..3de056a26d3556b3d1d4e31c3b314f4332eed1a1 100644 (file)
@@ -1,6 +1,8 @@
 2013-10-11  Eli Zaretskii  <eliz@gnu.org>
 
        * 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  <monnier@iro.umontreal.ca>
 
index 6c152c4920862ddf805db852b79102f2fbf5a544..43937d03905b3224eb5850b86311af1d3e110921 100644 (file)
@@ -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)