Function: treemacs-static-assert
treemacs-static-assert is a macro defined in treemacs-macros.el.
Signature
(treemacs-static-assert PREDICATE ERROR-MSG &rest ERROR-ARGS)
Documentation
Assert for macros that triggers at expansion time.
Tests PREDICATE and, if it evaluates to nil, throws an error with ERROR-MSG and
ERROR-ARGS. Basically the same thing as cl-assert, but does not (seem to)
interfere with auto-completion.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-macros.el
(defmacro treemacs-static-assert (predicate error-msg &rest error-args)
"Assert for macros that triggers at expansion time.
Tests PREDICATE and, if it evaluates to nil, throws an error with ERROR-MSG and
ERROR-ARGS. Basically the same thing as `cl-assert', but does not (seem to)
interfere with auto-completion."
(declare (indent 1))
`(unless ,predicate
(error (apply #'format
(concat "[Treemacs] " ,error-msg)
(list ,@error-args)))))