diff options
| author | Richard M. Stallman | 2005-04-23 16:38:03 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-04-23 16:38:03 +0000 |
| commit | 25e73e0cdb9f15ecf687a957f12184aa009e557a (patch) | |
| tree | ff454994ceade24efa3fd9db89b6495a88275355 | |
| parent | 5aaf089934c44beaa3fee655032f22ec5aab5888 (diff) | |
| download | emacs-25e73e0cdb9f15ecf687a957f12184aa009e557a.tar.gz emacs-25e73e0cdb9f15ecf687a957f12184aa009e557a.zip | |
(easy-menu-do-define): Use defalias, not fset.
| -rw-r--r-- | lisp/emacs-lisp/easymenu.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index b0f3b9b9d3e..78ba1fe27bf 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el | |||
| @@ -160,18 +160,18 @@ A menu item can be a list with the same format as MENU. This is a submenu." | |||
| 160 | (let ((keymap (easy-menu-create-menu (car menu) (cdr menu)))) | 160 | (let ((keymap (easy-menu-create-menu (car menu) (cdr menu)))) |
| 161 | (when symbol | 161 | (when symbol |
| 162 | (set symbol keymap) | 162 | (set symbol keymap) |
| 163 | (fset symbol | 163 | (defalias symbol |
| 164 | `(lambda (event) ,doc (interactive "@e") | 164 | `(lambda (event) ,doc (interactive "@e") |
| 165 | ;; FIXME: XEmacs uses popup-menu which calls the binding | 165 | ;; FIXME: XEmacs uses popup-menu which calls the binding |
| 166 | ;; while x-popup-menu only returns the selection. | 166 | ;; while x-popup-menu only returns the selection. |
| 167 | (x-popup-menu event | 167 | (x-popup-menu event |
| 168 | (or (and (symbolp ,symbol) | 168 | (or (and (symbolp ,symbol) |
| 169 | (funcall | 169 | (funcall |
| 170 | (or (plist-get (get ,symbol 'menu-prop) | 170 | (or (plist-get (get ,symbol 'menu-prop) |
| 171 | :filter) | 171 | :filter) |
| 172 | 'identity) | 172 | 'identity) |
| 173 | (symbol-function ,symbol))) | 173 | (symbol-function ,symbol))) |
| 174 | ,symbol))))) | 174 | ,symbol))))) |
| 175 | (mapcar (lambda (map) | 175 | (mapcar (lambda (map) |
| 176 | (define-key map (vector 'menu-bar (easy-menu-intern (car menu))) | 176 | (define-key map (vector 'menu-bar (easy-menu-intern (car menu))) |
| 177 | (cons 'menu-item | 177 | (cons 'menu-item |