From b2ce21068f173c2c7c6eaf8a5f45d5bb78e203d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 15 Apr 2025 01:20:10 -0400 Subject: [PATCH] fix(lib): void-function static-unless error Users may be on a build of Emacs 31 where `static-when` exists without `static-unless`. Fix: #8359 Amend: a13719af4513 --- lisp/doom-compat.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/doom-compat.el b/lisp/doom-compat.el index a99db1c60..f367a0727 100644 --- a/lisp/doom-compat.el +++ b/lisp/doom-compat.el @@ -201,8 +201,10 @@ the value of the last one, or nil if there are none." (cons 'progn body) nil) (macroexp-warn-and-return (format-message "`static-when' with empty body") - (list 'progn nil nil) '(empty-body static-when) t))) + (list 'progn nil nil) '(empty-body static-when) t)))) +;;; From Emacs 31+ +(unless (fboundp 'static-unless) (defmacro static-unless (condition &rest body) "A conditional compilation macro. Evaluate CONDITION at macro-expansion time. If it is nil,