mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
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: a13719af45
This commit is contained in:
@ -201,8 +201,10 @@ the value of the last one, or nil if there are none."
|
|||||||
(cons 'progn body)
|
(cons 'progn body)
|
||||||
nil)
|
nil)
|
||||||
(macroexp-warn-and-return (format-message "`static-when' with empty body")
|
(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)
|
(defmacro static-unless (condition &rest body)
|
||||||
"A conditional compilation macro.
|
"A conditional compilation macro.
|
||||||
Evaluate CONDITION at macro-expansion time. If it is nil,
|
Evaluate CONDITION at macro-expansion time. If it is nil,
|
||||||
|
Reference in New Issue
Block a user