Function: static-unless

static-unless is a macro defined in compat-31.el.

Signature

(static-unless CONDITION &rest BODY)

Documentation

[Compatibility macro for static-unless, 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 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-unless (condition &rest body) ;; <compat-tests:static-unless>
  "A conditional compilation macro.
Evaluate CONDITION at macro-expansion time.  If it is 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)
          nil
        (cons 'progn body))
    (macroexp-warn-and-return (format-message "`static-unless' with empty body")
                              (list 'progn nil nil) '(empty-body static-unless) t)))