summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2000-07-14 08:39:48 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2000-07-14 08:39:48 +0000
commit3a4f3f86ef4217d557b1969aef898cf66b7c64e5 (patch)
tree88ce275be5bfb6f60dab1c44fc436d1d3fe07773 /lisp/emacs-lisp
parentdd7b81cf87bb6cef96ca4923fa2f9108b1c36151 (diff)
downloademacs-3a4f3f86ef4217d557b1969aef898cf66b7c64e5.tar.gz
emacs-3a4f3f86ef4217d557b1969aef898cf66b7c64e5.tar.bz2
emacs-3a4f3f86ef4217d557b1969aef898cf66b7c64e5.zip
(easy-menu-convert-item-1): Intern the label.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easymenu.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 221a7a9c39d..49eaa551e13 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -351,11 +351,15 @@ MENU, just change it, otherwise put it last in MENU."
(or (null cache) (stringp cache) (vectorp cache)))
(setq prop (cons :key-sequence (cons cache prop))))))
(t (error "Invalid menu item in easymenu")))
- (cons name (and (not remove)
- (cons 'menu-item
- (cons label
- (and name
- (cons command prop))))))))
+ ;; `intern' the name so as to merge multiple entries with the same name.
+ ;; It also makes it easier/possible to lookup/change menu bindings
+ ;; via keymap functions.
+ (cons (intern name)
+ (and (not remove)
+ (cons 'menu-item
+ (cons label
+ (and name
+ (cons command prop))))))))
(defun easy-menu-define-key-intern (menu key item &optional before)
"Like easy-menu-define-key, but interns KEY and BEFORE if they are strings."