Function: static-when
static-when is a macro defined in compat-31.el.
Signature
(static-when CONDITION &rest BODY)
Documentation
[Compatibility macro for static-when, defined in Emacs 31.0.50. See (compat)
Emacs 31.0.50' for more details.]
A conditional compilation macro. Evaluate CONDITION at macro-expansion time. If it is non-nil, expand the macro to evaluate all BODY forms sequentially and return the value of the last one, or nil if there are none.
Source Code
;; Defined in ~/.emacs.d/elpa/compat-31.0.0.2/compat-31.el
(compat-defmacro static-when (condition &rest body) ;; <compat-tests:static-when>
"A conditional compilation macro.
Evaluate CONDITION at macro-expansion time. If it is non-nil,
expand the macro to evaluate all BODY forms sequentially and return
the value of the last one, or nil if there are none."
(declare (indent 1) (debug t))
(if body
(if (eval condition lexical-binding)
(cons 'progn body)
nil)
(macroexp-warn-and-return (format-message "`static-when' with empty body")
(list 'progn nil nil) '(empty-body static-when) t)))