changeset 61763:ce71dc9ea46f

(easy-menu-do-define): Use defalias, not fset.
author Richard M. Stallman <rms@gnu.org>
date Sat, 23 Apr 2005 16:38:03 +0000
parents eb4738891294
children 0d3c33403da5
files lisp/emacs-lisp/easymenu.el
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/easymenu.el	Sat Apr 23 16:36:53 2005 +0000
+++ b/lisp/emacs-lisp/easymenu.el	Sat Apr 23 16:38:03 2005 +0000
@@ -160,18 +160,18 @@
   (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