comparison lisp/tmm.el @ 34137:c95b5f588978

(tmm-get-keymap): Eval the menu name in `menu-item'.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 02 Dec 2000 21:31:02 +0000
parents a8e0d20f0043
children 8df7feb029cb
comparison
equal deleted inserted replaced
34136:5f2ff75f5199 34137:c95b5f588978
427 (setq cache (cdr (car (cdr elt)))) 427 (setq cache (cdr (car (cdr elt))))
428 cache (setq str (concat str cache)))) 428 cache (setq str (concat str cache))))
429 ((eq (car-safe elt) 'menu-item) 429 ((eq (car-safe elt) 'menu-item)
430 (setq plist (cdr-safe (cdr-safe (cdr-safe elt)))) 430 (setq plist (cdr-safe (cdr-safe (cdr-safe elt))))
431 (setq km (nth 2 elt)) 431 (setq km (nth 2 elt))
432 (setq str (nth 1 elt)) 432 (setq str (eval (nth 1 elt)))
433 (setq filter (plist-get plist :filter)) 433 (setq filter (plist-get plist :filter))
434 (if filter 434 (if filter
435 (setq km (funcall filter km))) 435 (setq km (funcall filter km)))
436 (and str 436 (and str
437 (consp (nth 3 elt)) 437 (consp (nth 3 elt))
461 (when (and km (symbolp km) (get km 'menu-enable)) 461 (when (and km (symbolp km) (get km 'menu-enable))
462 (unless (eval (get km 'menu-enable)) 462 (unless (eval (get km 'menu-enable))
463 (setq km nil))) 463 (setq km nil)))
464 (and km str 464 (and km str
465 (or (assoc str tmm-km-list) 465 (or (assoc str tmm-km-list)
466 (setq tmm-km-list 466 (push (cons str (cons event km)) tmm-km-list))))))
467 (cons (cons str (cons event km)) tmm-km-list)))
468 ))))
469 467
470 (defun tmm-get-keybind (keyseq) 468 (defun tmm-get-keybind (keyseq)
471 "Return the current binding of KEYSEQ, merging prefix definitions. 469 "Return the current binding of KEYSEQ, merging prefix definitions.
472 If KEYSEQ is a prefix key that has local and global bindings, 470 If KEYSEQ is a prefix key that has local and global bindings,
473 we merge them into a single keymap which shows the proper order of the menu. 471 we merge them into a single keymap which shows the proper order of the menu.