comparison lisp/emacs-lisp/easymenu.el @ 58123:b7ee8419031b

(easy-menu-define-key): Understand the case where the keymap is a symbol.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 10 Nov 2004 15:15:43 +0000
parents 21dc9bd90575
children 28acd37455bb
comparison
equal deleted inserted replaced
58122:1e9ea828c37a 58123:b7ee8419031b
376 if a binding for KEY is already present in MENU, just change it; 376 if a binding for KEY is already present in MENU, just change it;
377 otherwise put the new binding last in MENU. 377 otherwise put the new binding last in MENU.
378 BEFORE can be either a string (menu item name) or a symbol 378 BEFORE can be either a string (menu item name) or a symbol
379 \(the fake function key for the menu item). 379 \(the fake function key for the menu item).
380 KEY does not have to be a symbol, and comparison is done with equal." 380 KEY does not have to be a symbol, and comparison is done with equal."
381 (if (symbolp menu) (setq menu (indirect-function menu)))
381 (let ((inserted (null item)) ; Fake already inserted. 382 (let ((inserted (null item)) ; Fake already inserted.
382 tail done) 383 tail done)
383 (while (not done) 384 (while (not done)
384 (cond 385 (cond
385 ((or (setq done (or (null (cdr menu)) (keymapp (cdr menu)))) 386 ((or (setq done (or (null (cdr menu)) (keymapp (cdr menu))))