changeset 19761:17137a054eeb

(easy-menu-create-keymaps): If two distinct items have the same string, make different keyx events for them.
author Richard M. Stallman <rms@gnu.org>
date Fri, 05 Sep 1997 05:45:02 +0000
parents ad4989a73bf0
children f6ca32374b0b
files lisp/emacs-lisp/easymenu.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/easymenu.el	Fri Sep 05 05:43:29 1997 +0000
+++ b/lisp/emacs-lisp/easymenu.el	Fri Sep 05 05:45:02 1997 +0000
@@ -203,7 +203,11 @@
 	  (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))