Mercurial > emacs
comparison lisp/emacs-lisp/easymenu.el @ 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 | c24b4ef20525 |
children | 0c51c56d0a4f |
comparison
equal
deleted
inserted
replaced
19760:ad4989a73bf0 | 19761:17137a054eeb |
---|---|
201 (if (and not-button have-buttons) | 201 (if (and not-button have-buttons) |
202 (setq item-string (concat " " item-string))) | 202 (setq item-string (concat " " item-string))) |
203 (setq command (cons item-string command)) | 203 (setq command (cons item-string command)) |
204 (if (not have-buttons) ; Save all items so that we can fix | 204 (if (not have-buttons) ; Save all items so that we can fix |
205 (setq old-items (cons command old-items))) ; if we have buttons. | 205 (setq old-items (cons command old-items))) ; if we have buttons. |
206 (if name (define-key menu (vector (intern name)) command)))) | 206 (when name |
207 (let ((key (vector (intern name)))) | |
208 (if (lookup-key menu key) | |
209 (setq key (vector (intern (concat name "*"))))) | |
210 (define-key menu key command))))) | |
207 (setq menu-items (cdr menu-items))) | 211 (setq menu-items (cdr menu-items))) |
208 menu)) | 212 menu)) |
209 | 213 |
210 (defun easy-menu-update-button (item ch selected active) | 214 (defun easy-menu-update-button (item ch selected active) |
211 "Used as menu-enable property to update buttons. | 215 "Used as menu-enable property to update buttons. |