From 3a4f3f86ef4217d557b1969aef898cf66b7c64e5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 14 Jul 2000 08:39:48 +0000 Subject: (easy-menu-convert-item-1): Intern the label. --- lisp/emacs-lisp/easymenu.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lisp/emacs-lisp/easymenu.el') 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." -- cgit v1.2.1