summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-01-08 18:44:13 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-01-08 18:44:13 -0500
commit3b9dad88e02f05773c599808266febf3e4128222 (patch)
treec2d14608aa3e6845ddfceaaa79b49b3cfbaf265e /lisp/emacs-lisp
parent9d3d6f850060db078c7a6853aa3eb8f6e8dca520 (diff)
downloademacs-3b9dad88e02f05773c599808266febf3e4128222.tar.gz
* lisp/subr.el (letrec): Optimize some non-recursive bindings
* lisp/emacs-lisp/macroexp.el (macroexp--fgrep): Look inside bytecode objects as well. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): * test/lisp/subr-tests.el (subr--tests-letrec): New tests.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/macroexp.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index d5fda528b4f..37844977f8f 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -499,7 +499,7 @@ test of free variables in the following ways:
(dolist (binding (macroexp--fgrep bindings (pop sexp)))
(push binding res)
(setq bindings (remove binding bindings))))
- (if (vectorp sexp)
+ (if (or (vectorp sexp) (byte-code-function-p sexp))
;; With backquote, code can appear within vectors as well.
;; This wouldn't be needed if we `macroexpand-all' before
;; calling macroexp--fgrep, OTOH.