aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-11-06 12:10:22 +0200
committerEli Zaretskii2013-11-06 12:10:22 +0200
commitf72552bd387e3bef50507a3e5b37a8ca19946941 (patch)
treea99804f1407ff726e6acd95283d634945a0b16cc
parent5d5c701ef9c651af49a1c4cf365eb5f3754efe0b (diff)
downloademacs-f72552bd387e3bef50507a3e5b37a8ca19946941.tar.gz
emacs-f72552bd387e3bef50507a3e5b37a8ca19946941.zip
Fix bug #15817 with TTY menus produced by minor modes.
lisp/menu-bar.el (popup-menu, menu-bar-open): When displaying TTY menus, support also the menus produced by minor modes.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/menu-bar.el7
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d775afd9c5b..4740eab6ee6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-11-06 Eli Zaretskii <eliz@gnu.org>
2
3 * menu-bar.el (popup-menu, menu-bar-open): When displaying TTY
4 menus, support also the menus produced by minor modes.
5 (Bug#15817)
6
12013-11-06 Leo Liu <sdl.web@gmail.com> 72013-11-06 Leo Liu <sdl.web@gmail.com>
2 8
3 * thingatpt.el (thing-at-point-looking-at): Add optional arg 9 * thingatpt.el (thing-at-point-looking-at): Add optional arg
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 7ffc97b55de..ae1edabf583 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2192,7 +2192,9 @@ FROM-MENU-BAR, if non-nil, means we are dropping one of menu-bar's menus."
2192 (or 2192 (or
2193 (lookup-key global-map (vector 'menu-bar menu-symbol)) 2193 (lookup-key global-map (vector 'menu-bar menu-symbol))
2194 (lookup-key (current-local-map) (vector 'menu-bar 2194 (lookup-key (current-local-map) (vector 'menu-bar
2195 menu-symbol)))))) 2195 menu-symbol))
2196 (cdar (minor-mode-key-binding (vector 'menu-bar
2197 menu-symbol)))))))
2196 ((and (not (keymapp map)) (listp map)) 2198 ((and (not (keymapp map)) (listp map))
2197 ;; We were given a list of keymaps. Search them all 2199 ;; We were given a list of keymaps. Search them all
2198 ;; in sequence until a first binding is found. 2200 ;; in sequence until a first binding is found.
@@ -2278,7 +2280,8 @@ If FRAME is nil or not given, use the selected frame."
2278 (menu (menu-bar-menu-at-x-y x 0 frame))) 2280 (menu (menu-bar-menu-at-x-y x 0 frame)))
2279 (popup-menu (or 2281 (popup-menu (or
2280 (lookup-key global-map (vector 'menu-bar menu)) 2282 (lookup-key global-map (vector 'menu-bar menu))
2281 (lookup-key (current-local-map) (vector 'menu-bar menu))) 2283 (lookup-key (current-local-map) (vector 'menu-bar menu))
2284 (cdar (minor-mode-key-binding (vector 'menu-bar menu))))
2282 (posn-at-x-y x 0 nil t) nil t))) 2285 (posn-at-x-y x 0 nil t) nil t)))
2283 (t (with-selected-frame (or frame (selected-frame)) 2286 (t (with-selected-frame (or frame (selected-frame))
2284 (tmm-menubar)))))) 2287 (tmm-menubar))))))