]> git.eshelyaron.com Git - emacs.git/commitdiff
(easy-menu-do-define): Use defalias, not fset.
authorRichard M. Stallman <rms@gnu.org>
Sat, 23 Apr 2005 16:38:03 +0000 (16:38 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 23 Apr 2005 16:38:03 +0000 (16:38 +0000)
lisp/emacs-lisp/easymenu.el

index b0f3b9b9d3e86c6f6a5f04ad06c5f37cd55d25d9..78ba1fe27bfb4714c797e5654553d8ef04e0fee5 100644 (file)
@@ -160,18 +160,18 @@ A menu item can be a list with the same format as MENU.  This is a submenu."
   (let ((keymap (easy-menu-create-menu (car menu) (cdr menu))))
     (when symbol
       (set symbol keymap)
-      (fset symbol
-           `(lambda (event) ,doc (interactive "@e")
-              ;; FIXME: XEmacs uses popup-menu which calls the binding
-              ;; while x-popup-menu only returns the selection.
-              (x-popup-menu event
-                            (or (and (symbolp ,symbol)
-                                     (funcall
-                                      (or (plist-get (get ,symbol 'menu-prop)
-                                                     :filter)
-                                          'identity)
-                                      (symbol-function ,symbol)))
-                                ,symbol)))))
+      (defalias symbol
+       `(lambda (event) ,doc (interactive "@e")
+          ;; FIXME: XEmacs uses popup-menu which calls the binding
+          ;; while x-popup-menu only returns the selection.
+          (x-popup-menu event
+                        (or (and (symbolp ,symbol)
+                                 (funcall
+                                  (or (plist-get (get ,symbol 'menu-prop)
+                                                 :filter)
+                                      'identity)
+                                  (symbol-function ,symbol)))
+                            ,symbol)))))
     (mapcar (lambda (map)
              (define-key map (vector 'menu-bar (easy-menu-intern (car menu)))
                (cons 'menu-item