From b7b49316c596a463ef4f9dd8220bad1e2f2e3eff Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 24 Apr 2008 02:02:40 +0000 Subject: (easy-menu-make-symbol): Don't wrap keyboard macros within lambdas. --- lisp/emacs-lisp/easymenu.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index ca5151fa984..8e2f4322c03 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -470,7 +470,10 @@ When non-nil, NOEXP indicates that CALLBACK cannot be an expression (make-symbol (format "menu-function-%d" easy-menu-item-count)))) (setq easy-menu-item-count (1+ easy-menu-item-count)) (fset command - (if (or (keymapp callback) (functionp callback) noexp) callback + (if (or (keymapp callback) (commandp callback) + ;; `functionp' is probably not needed. + (functionp callback) noexp) + callback `(lambda () (interactive) ,callback))) command)) -- cgit v1.2.1