comparison lisp/tmm.el @ 62302:587868b19cb8

(tmm-get-keymap): Include only active menus and menu items.
author Nick Roberts <nickrob@snap.net.nz>
date Fri, 13 May 2005 23:23:42 +0000
parents 695cf19ef79e
children f7490b212956 f042e7c0fe20
comparison
equal deleted inserted replaced
62301:2acfd9cf6713 62302:587868b19cb8
393 The values are deduced from the argument ELT, that should be an 393 The values are deduced from the argument ELT, that should be an
394 element of keymap, an `x-popup-menu' argument, or an element of 394 element of keymap, an `x-popup-menu' argument, or an element of
395 `x-popup-menu' argument (when IN-X-MENU is not-nil). 395 `x-popup-menu' argument (when IN-X-MENU is not-nil).
396 This function adds the element only if it is not already present. 396 This function adds the element only if it is not already present.
397 It uses the free variable `tmm-table-undef' to keep undefined keys." 397 It uses the free variable `tmm-table-undef' to keep undefined keys."
398 (let (km str cache plist filter visible (event (car elt))) 398 (let (km str cache plist filter visible enable (event (car elt)))
399 (setq elt (cdr elt)) 399 (setq elt (cdr elt))
400 (if (eq elt 'undefined) 400 (if (eq elt 'undefined)
401 (setq tmm-table-undef (cons (cons event nil) tmm-table-undef)) 401 (setq tmm-table-undef (cons (cons event nil) tmm-table-undef))
402 (unless (assoc event tmm-table-undef) 402 (unless (assoc event tmm-table-undef)
403 (cond ((if (listp elt) 403 (cond ((if (listp elt)
434 (if filter 434 (if filter
435 (setq km (funcall filter km))) 435 (setq km (funcall filter km)))
436 (setq visible (plist-get plist :visible)) 436 (setq visible (plist-get plist :visible))
437 (if visible 437 (if visible
438 (setq km (and (eval visible) km))) 438 (setq km (and (eval visible) km)))
439 (setq enable (plist-get plist :enable))
440 (if enable
441 (setq km (and (eval enable) km)))
439 (and str 442 (and str
440 (consp (nth 3 elt)) 443 (consp (nth 3 elt))
441 (stringp (cdr (nth 3 elt))) ; keyseq cache 444 (stringp (cdr (nth 3 elt))) ; keyseq cache
442 (setq cache (cdr (nth 3 elt))) 445 (setq cache (cdr (nth 3 elt)))
443 cache 446 cache