diff options
Diffstat (limited to 'lisp/emacs-lisp/macroexp.el')
-rw-r--r-- | lisp/emacs-lisp/macroexp.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index faf0b1619e0..27a7a8f8cf1 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -382,14 +382,17 @@ Assumes the caller has bound `macroexpand-all-environment'." (macroexp--all-forms args) form) (macroexp--expand-all newform)))) - (`(funcall . ,(or `(,exp . ,args) pcase--dontcare)) + (`(funcall ,exp . ,args) (let ((eexp (macroexp--expand-all exp)) (eargs (macroexp--all-forms args))) ;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo' ;; has a compiler-macro, or to unfold it. (pcase eexp - (`#',f (macroexp--expand-all `(,f . ,eargs))) + ((and `#',f + (guard (not (or (special-form-p f) (macrop f))))) ;; bug#46636 + (macroexp--expand-all `(,f . ,eargs))) (_ `(funcall ,eexp . ,eargs))))) + (`(funcall . ,_) form) ;bug#53227 (`(,func . ,_) (let ((handler (function-get func 'compiler-macro)) (funargs (function-get func 'funarg-positions))) @@ -430,7 +433,6 @@ Assumes the caller has bound `macroexpand-all-environment'." newform (macroexp--expand-all newform))) (macroexp--expand-all newform)))))) - (_ form))) (pop byte-compile-form-stack))) |