From f070b8ae20aa70544e318d8dcafef5b8455cf882 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 5 Sep 1997 05:45:02 +0000 Subject: [PATCH] (easy-menu-create-keymaps): If two distinct items have the same string, make different keyx events for them. --- lisp/emacs-lisp/easymenu.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)) -- 2.39.2