]> code.delx.au - gnu-emacs/blobdiff - lisp/tmm.el
(ediff-even-diff-face-A): Fix spelling.
[gnu-emacs] / lisp / tmm.el
index 6aa4f50f6cae3296729d7ccf2051a221313239ed..7243818639118c4e23e292131e14efc51f8105d0 100644 (file)
@@ -399,7 +399,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 (event (car elt)))
+  (let (km str cache plist filter (event (car elt)))
     (setq elt (cdr elt))
     (if (eq elt 'undefined)
        (setq tmm-table-undef (cons (cons event nil) tmm-table-undef))
@@ -425,12 +425,16 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
                    (setq cache (cdr (car (cdr elt))))
                    cache (setq str (concat str cache))))
              ((eq (car-safe elt) 'menu-item)
+              (setq plist (cdr-safe (cdr-safe (cdr-safe elt))))
               (setq km (nth 2 elt))
               (setq str (nth 1 elt))
+              (setq filter (plist-get plist :filter))
+              (if filter
+                  (setq km (funcall filter km)))
               (and str
                    (consp (nth 3 elt))
-                   (stringp (cdr (car (nth 3 elt)))) ; keyseq cache
-                   (setq cache (cdr (car (nth 3 elt))))
+                   (stringp (cdr (nth 3 elt))) ; keyseq cache
+                   (setq cache (cdr (nth 3 elt)))
                    cache
                    (setq str (concat str cache))))
              ((if (listp (cdr-safe (cdr-safe (cdr-safe elt))))