Commit a070bd1c authored by Stefan Monnier's avatar Stefan Monnier

* lisp/emacs-lisp/easymenu.el: Don't quote lambdas

(easy-menu-do-define, easy-menu-make-symbol): Replace `(lambda ..)
with a closure.
parent e8bcf45f
Pipeline #3967 failed with stage
in 58 minutes and 26 seconds
...@@ -183,17 +183,17 @@ This is expected to be bound to a mouse event." ...@@ -183,17 +183,17 @@ This is expected to be bound to a mouse event."
(when symbol (when symbol
(set symbol keymap) (set symbol keymap)
(defalias symbol (defalias symbol
`(lambda (event) ,doc (interactive "@e") (lambda (event) (:documentation doc) (interactive "@e")
;; FIXME: XEmacs uses popup-menu which calls the binding ;; FIXME: XEmacs uses popup-menu which calls the binding
;; while x-popup-menu only returns the selection. ;; while x-popup-menu only returns the selection.
(x-popup-menu event (x-popup-menu event
(or (and (symbolp ,symbol) (or (and (symbolp symbol)
(funcall (funcall
(or (plist-get (get ,symbol 'menu-prop) (or (plist-get (get symbol 'menu-prop)
:filter) :filter)
'identity) 'identity)
(symbol-function ,symbol))) (symbol-function symbol)))
,symbol))))) symbol)))))
(dolist (map (if (keymapp maps) (list maps) maps)) (dolist (map (if (keymapp maps) (list maps) maps))
(define-key map (define-key map
(vector 'menu-bar (easy-menu-intern (car menu))) (vector 'menu-bar (easy-menu-intern (car menu)))
...@@ -475,7 +475,7 @@ When non-nil, NOEXP indicates that CALLBACK cannot be an expression ...@@ -475,7 +475,7 @@ When non-nil, NOEXP indicates that CALLBACK cannot be an expression
;; `functionp' is probably not needed. ;; `functionp' is probably not needed.
(functionp callback) noexp) (functionp callback) noexp)
callback callback
`(lambda () (interactive) ,callback))) (lambda () (interactive) callback)))
command)) command))
;;;###autoload ;;;###autoload
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment