changeset 22482:eb09852bfc05

(tmm-get-keymap): Handle :filter.
author Richard M. Stallman <rms@gnu.org>
date Sun, 14 Jun 1998 18:46:20 +0000
parents c19803db4a93
children d21d2c3762c1
files lisp/tmm.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tmm.el	Sun Jun 14 16:19:33 1998 +0000
+++ b/lisp/tmm.el	Sun Jun 14 18:46:20 1998 +0000
@@ -399,7 +399,7 @@
 `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,8 +425,12 @@
 		    (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 (nth 3 elt))) ; keyseq cache