* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Optimize away trivial
uses of `funcall'.
This commit is contained in:
parent
9e48a95cf2
commit
4d5468e529
2 changed files with 11 additions and 2 deletions
|
@ -251,6 +251,10 @@ Assumes the caller has bound `macroexpand-all-environment'."
|
|||
(format "%s quoted with ' rather than with #'"
|
||||
(list 'lambda (nth 1 f) '...))
|
||||
(macroexp--expand-all `(,fun ,arg1 ,f . ,args))))
|
||||
(`(funcall (,(or 'quote 'function) ,(and f (pred symbolp) . ,_)) . ,args)
|
||||
;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo'
|
||||
;; has a compiler-macro.
|
||||
(macroexp--expand-all `(,f . ,args)))
|
||||
(`(,func . ,_)
|
||||
;; Macro expand compiler macros. This cannot be delayed to
|
||||
;; byte-optimize-form because the output of the compiler-macro can
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue