summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-09-05 05:45:02 +0000
committerRichard M. Stallman <rms@gnu.org>1997-09-05 05:45:02 +0000
commit560d4a5ae2a3eded35c230f947bef1f8827e1122 (patch)
tree00b20ca8fd6fac34ac3c9584a191c322d266ef34
parent41bdca3f1db6d17be5f28e90ce39b28d8e494c66 (diff)
downloademacs-560d4a5ae2a3eded35c230f947bef1f8827e1122.tar.gz
(easy-menu-create-keymaps):
If two distinct items have the same string, make different keyx events for them.
-rw-r--r--lisp/emacs-lisp/easymenu.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 081780bd465..4988d0e1d14 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -203,7 +203,11 @@ is a list of menu items, as above."
(setq command (cons item-string command))
(if (not have-buttons) ; Save all items so that we can fix
(setq old-items (cons command old-items))) ; if we have buttons.
- (if name (define-key menu (vector (intern name)) command))))
+ (when name
+ (let ((key (vector (intern name))))
+ (if (lookup-key menu key)
+ (setq key (vector (intern (concat name "*")))))
+ (define-key menu key command)))))
(setq menu-items (cdr menu-items)))
menu))