diff options
| author | Stefan Monnier | 2022-12-02 19:15:46 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2022-12-02 19:15:46 -0500 |
| commit | 73d169c7db36e8144b2766532181a57ff146bc11 (patch) | |
| tree | 75f6221da995f82c43164f9a6566c494074d4afc | |
| parent | 64044f545add60e045ff16a9891b06f429ac935f (diff) | |
| download | emacs-73d169c7db36e8144b2766532181a57ff146bc11.tar.gz emacs-73d169c7db36e8144b2766532181a57ff146bc11.zip | |
* lisp/emacs-lisp/cl-macs.el (cl-flet): Optimize a bit more
Also optimize the case where we use `cl-flet` to introduce a local alias.
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 43a2ed92059..95e78ceab6a 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -2052,7 +2052,8 @@ info node `(cl) Function Bindings' for details. | |||
| 2052 | (dolist (binding bindings) | 2052 | (dolist (binding bindings) |
| 2053 | (let ((var (make-symbol (format "--cl-%s--" (car binding)))) | 2053 | (let ((var (make-symbol (format "--cl-%s--" (car binding)))) |
| 2054 | (args-and-body (cdr binding))) | 2054 | (args-and-body (cdr binding))) |
| 2055 | (if (and (= (length args-and-body) 1) (symbolp (car args-and-body))) | 2055 | (if (and (= (length args-and-body) 1) |
| 2056 | (macroexp-copyable-p (car args-and-body))) | ||
| 2056 | ;; Optimize (cl-flet ((fun var)) body). | 2057 | ;; Optimize (cl-flet ((fun var)) body). |
| 2057 | (setq var (car args-and-body)) | 2058 | (setq var (car args-and-body)) |
| 2058 | (push (list var (if (= (length args-and-body) 1) | 2059 | (push (list var (if (= (length args-and-body) 1) |