aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-10-05 19:33:37 +0300
committerEli Zaretskii2013-10-05 19:33:37 +0300
commit72b70f6a68ac53cbab4db0e290259c1182a94db4 (patch)
treea2a72460f6b712cc9311920fda662d060f5e69e3
parent63dfbda7df0df5b054f8f95b79673672c267de54 (diff)
downloademacs-72b70f6a68ac53cbab4db0e290259c1182a94db4.tar.gz
emacs-72b70f6a68ac53cbab4db0e290259c1182a94db4.zip
Fix pop down menu with another click on menu bar.
-rw-r--r--lisp/menu-bar.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index e37c6a28b4f..52cf0fd2f6d 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2269,6 +2269,29 @@ If nil, the current mouse position is used."
2269 map (current-global-map)) 2269 map (current-global-map))
2270 (substitute-key-definition 'keyboard-escape-quit 'tty-menu-exit 2270 (substitute-key-definition 'keyboard-escape-quit 'tty-menu-exit
2271 map (current-global-map)) 2271 map (current-global-map))
2272 ;; The bindings of menu-bar items are so that clicking on the menu
2273 ;; bar when a menu is already shown pops down that menu.
2274 ;; FIXME: we should iterate over all the visible menu-bar items,
2275 ;; instead of naming them explicitly here. Also, this doesn't
2276 ;; include items added by current major mode.
2277 (substitute-key-definition (lookup-key (current-global-map) [menu-bar file])
2278 'tty-menu-exit
2279 map (current-global-map))
2280 (substitute-key-definition (lookup-key (current-global-map) [menu-bar edit])
2281 'tty-menu-exit
2282 map (current-global-map))
2283 (substitute-key-definition (lookup-key (current-global-map) [menu-bar options])
2284 'tty-menu-exit
2285 map (current-global-map))
2286 (substitute-key-definition (lookup-key (current-global-map) [menu-bar buffer])
2287 'tty-menu-exit
2288 map (current-global-map))
2289 (substitute-key-definition (lookup-key (current-global-map) [menu-bar tools])
2290 'tty-menu-exit
2291 map (current-global-map))
2292 (substitute-key-definition (lookup-key (current-global-map) [menu-bar help-menu])
2293 'tty-menu-exit
2294 map (current-global-map))
2272 (substitute-key-definition 'forward-char 'tty-menu-next-menu 2295 (substitute-key-definition 'forward-char 'tty-menu-next-menu
2273 map (current-global-map)) 2296 map (current-global-map))
2274 (substitute-key-definition 'backward-char 'tty-menu-prev-menu 2297 (substitute-key-definition 'backward-char 'tty-menu-prev-menu