(funcall (eval (cadr form)))
(byte-compile-constant nil)))
+(defun macroexp--compiling-p ()
+ "Return non-nil if we're macroexpanding for the compiler."
+ ;; FIXME: ¡¡Major Ugly Hack!! To determine whether the output of this
+ ;; macro-expansion will be processed by the byte-compiler, we check
+ ;; circumstantial evidence.
+ (member '(declare-function . byte-compile-macroexpand-declare-function)
+ macroexpand-all-environment))
+
+
(defun macroexp--warn-and-return (msg form)
(let ((when-compiled (lambda () (byte-compile-log-warning msg t))))
(cond
((null msg) form)
- ;; FIXME: ¡¡Major Ugly Hack!! To determine whether the output of this
- ;; macro-expansion will be processed by the byte-compiler, we check
- ;; circumstantial evidence.
- ((member '(declare-function . byte-compile-macroexpand-declare-function)
- macroexpand-all-environment)
+ ((macroexp--compiling-p)
`(progn
(macroexp--funcall-if-compiled ',when-compiled)
,form))