From: Stefan Monnier Date: Mon, 29 Mar 2010 15:23:01 +0000 (-0400) Subject: Make tmm-menubar work for the Buffers menu again. X-Git-Tag: emacs-pretest-23.1.95~19 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe59d70512322e7001ffd772f5e74c7302b7e1d5;p=emacs.git Make tmm-menubar work for the Buffers menu again. * tmm.el (tmm-prompt): Also handle keymap entries in the form of vectors rather than cons cells, as used in menu-bar-update-buffers. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3294db39d52..bbe764b6b4a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-03-29 Stefan Monnier + + Make tmm-menubar work for the Buffers menu again. + * tmm.el (tmm-prompt): Also handle keymap entries in the form of + vectors rather than cons cells, as used in menu-bar-update-buffers. + 2010-03-28 Chong Yidong * progmodes/js.el (js-auto-indent-flag, js-mode-map) diff --git a/lisp/tmm.el b/lisp/tmm.el index 946baad59e7..f4ae3c110d5 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -170,7 +170,11 @@ Its value should be an event that has a binding in MENU." (mapc (lambda (elt) (if (stringp elt) (setq gl-str elt) - (and (listp elt) (tmm-get-keymap elt not-menu)))) + (cond + ((listp elt) (tmm-get-keymap elt not-menu)) + ((vectorp elt) + (dotimes (i (length elt)) + (tmm-get-keymap (cons i (aref elt i)) not-menu)))))) menu) ;; Choose an element of tmm-km-list; put it in choice. (if (and not-menu (= 1 (length tmm-km-list)))