From: Nick Roberts Date: Fri, 13 May 2005 23:23:42 +0000 (+0000) Subject: (tmm-get-keymap): Include only active menus and menu items. X-Git-Tag: ttn-vms-21-2-B4~334 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ae862e279b45d58518bf910e979a3c1f0cb2683;p=emacs.git (tmm-get-keymap): Include only active menus and menu items. --- diff --git a/lisp/tmm.el b/lisp/tmm.el index 99931867792..3e0a8e95701 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -395,7 +395,7 @@ element of keymap, an `x-popup-menu' argument, or an element of `x-popup-menu' argument (when IN-X-MENU is not-nil). This function adds the element only if it is not already present. It uses the free variable `tmm-table-undef' to keep undefined keys." - (let (km str cache plist filter visible (event (car elt))) + (let (km str cache plist filter visible enable (event (car elt))) (setq elt (cdr elt)) (if (eq elt 'undefined) (setq tmm-table-undef (cons (cons event nil) tmm-table-undef)) @@ -436,6 +436,9 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." (setq visible (plist-get plist :visible)) (if visible (setq km (and (eval visible) km))) + (setq enable (plist-get plist :enable)) + (if enable + (setq km (and (eval enable) km))) (and str (consp (nth 3 elt)) (stringp (cdr (nth 3 elt))) ; keyseq cache