]> code.delx.au - gnu-emacs/commitdiff
Fix bug #15817 with TTY menus produced by minor modes.
authorEli Zaretskii <eliz@gnu.org>
Wed, 6 Nov 2013 10:10:22 +0000 (12:10 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 6 Nov 2013 10:10:22 +0000 (12:10 +0200)
 lisp/menu-bar.el (popup-menu, menu-bar-open): When displaying TTY
 menus, support also the menus produced by minor modes.

lisp/ChangeLog
lisp/menu-bar.el

index d775afd9c5b9347ede98dda08d3b316c5c876b65..4740eab6ee6bd5564cea3112e74d040e06bcf8da 100644 (file)
@@ -1,3 +1,9 @@
+2013-11-06  Eli Zaretskii  <eliz@gnu.org>
+
+       * menu-bar.el (popup-menu, menu-bar-open): When displaying TTY
+       menus, support also the menus produced by minor modes.
+       (Bug#15817)
+
 2013-11-06  Leo Liu  <sdl.web@gmail.com>
 
        * thingatpt.el (thing-at-point-looking-at): Add optional arg
index 7ffc97b55de8142039a2aeff61e4b05d5db6ea3e..ae1edabf58390957340cd2529e449745d25bd080 100644 (file)
@@ -2192,7 +2192,9 @@ FROM-MENU-BAR, if non-nil, means we are dropping one of menu-bar's menus."
                      (or
                       (lookup-key global-map (vector 'menu-bar menu-symbol))
                       (lookup-key (current-local-map) (vector 'menu-bar
-                                                              menu-symbol))))))
+                                                              menu-symbol))
+                      (cdar (minor-mode-key-binding (vector 'menu-bar
+                                                            menu-symbol)))))))
             ((and (not (keymapp map)) (listp map))
              ;; We were given a list of keymaps.  Search them all
              ;; in sequence until a first binding is found.
@@ -2278,7 +2280,8 @@ If FRAME is nil or not given, use the selected frame."
             (menu (menu-bar-menu-at-x-y x 0 frame)))
        (popup-menu (or
                     (lookup-key global-map (vector 'menu-bar menu))
-                    (lookup-key (current-local-map) (vector 'menu-bar menu)))
+                    (lookup-key (current-local-map) (vector 'menu-bar menu))
+                    (cdar (minor-mode-key-binding (vector 'menu-bar menu))))
                    (posn-at-x-y x 0 nil t) nil t)))
      (t (with-selected-frame (or frame (selected-frame))
           (tmm-menubar))))))