macroexp--expand-all: Don't call function-get on non-symbols

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Don't call
function-get on non-symbols (bug#77550).
This commit is contained in:
Alan Mackenzie 2025-04-05 18:41:00 +00:00 committed by Sean Whitton
parent 5fc1bd879e
commit c418e454b3

View file

@ -489,7 +489,7 @@ Assumes the caller has bound `macroexpand-all-environment'."
(macroexp--unfold-lambda `(,fn ,eexp . ,eargs)))
(_ `(,fn ,eexp . ,eargs)))))
(`(funcall . ,_) form) ;bug#53227
(`(,func . ,_)
(`(,(and func (pred symbolp)) . ,_)
(let ((handler (function-get func 'compiler-macro)))
;; Macro expand compiler macros. This cannot be delayed to
;; byte-optimize-form because the output of the compiler-macro can