diff options
| author | Stefan Monnier | 2019-11-07 17:08:51 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2019-11-07 17:09:16 -0500 |
| commit | a070bd1c8b5213ad469d41dd80d392f924644aed (patch) | |
| tree | 6d3f26d801811fbc98284f33fe880848d23239c3 | |
| parent | e8bcf45f306bcf4c9e8d643d68e4aabe0c69c7ca (diff) | |
| download | emacs-a070bd1c8b5213ad469d41dd80d392f924644aed.tar.gz emacs-a070bd1c8b5213ad469d41dd80d392f924644aed.zip | |
* lisp/emacs-lisp/easymenu.el: Don't quote lambdas
(easy-menu-do-define, easy-menu-make-symbol): Replace `(lambda ..)
with a closure.
| -rw-r--r-- | lisp/emacs-lisp/easymenu.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index f274f62164f..292d50b91ab 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el | |||
| @@ -183,17 +183,17 @@ This is expected to be bound to a mouse event." | |||
| 183 | (when symbol | 183 | (when symbol |
| 184 | (set symbol keymap) | 184 | (set symbol keymap) |
| 185 | (defalias symbol | 185 | (defalias symbol |
| 186 | `(lambda (event) ,doc (interactive "@e") | 186 | (lambda (event) (:documentation doc) (interactive "@e") |
| 187 | ;; FIXME: XEmacs uses popup-menu which calls the binding | 187 | ;; FIXME: XEmacs uses popup-menu which calls the binding |
| 188 | ;; while x-popup-menu only returns the selection. | 188 | ;; while x-popup-menu only returns the selection. |
| 189 | (x-popup-menu event | 189 | (x-popup-menu event |
| 190 | (or (and (symbolp ,symbol) | 190 | (or (and (symbolp symbol) |
| 191 | (funcall | 191 | (funcall |
| 192 | (or (plist-get (get ,symbol 'menu-prop) | 192 | (or (plist-get (get symbol 'menu-prop) |
| 193 | :filter) | 193 | :filter) |
| 194 | 'identity) | 194 | 'identity) |
| 195 | (symbol-function ,symbol))) | 195 | (symbol-function symbol))) |
| 196 | ,symbol))))) | 196 | symbol))))) |
| 197 | (dolist (map (if (keymapp maps) (list maps) maps)) | 197 | (dolist (map (if (keymapp maps) (list maps) maps)) |
| 198 | (define-key map | 198 | (define-key map |
| 199 | (vector 'menu-bar (easy-menu-intern (car menu))) | 199 | (vector 'menu-bar (easy-menu-intern (car menu))) |
| @@ -475,7 +475,7 @@ When non-nil, NOEXP indicates that CALLBACK cannot be an expression | |||
| 475 | ;; `functionp' is probably not needed. | 475 | ;; `functionp' is probably not needed. |
| 476 | (functionp callback) noexp) | 476 | (functionp callback) noexp) |
| 477 | callback | 477 | callback |
| 478 | `(lambda () (interactive) ,callback))) | 478 | (lambda () (interactive) callback))) |
| 479 | command)) | 479 | command)) |
| 480 | 480 | ||
| 481 | ;;;###autoload | 481 | ;;;###autoload |