summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2026-05-02 13:07:52 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2026-05-02 13:07:52 +0200
commitc2d26f958490777adbafd4327cc18ec7880391d3 (patch)
tree1d1b6118395ea7d1ba37d24ed72193307d79563e
parent55f1c4dff4a2e9543e62575ede0c02a882d6f49a (diff)
compat-tests: Use static-when
-rw-r--r--compat-tests.el23
1 files changed, 11 insertions, 12 deletions
diff --git a/compat-tests.el b/compat-tests.el
index ebbe804..496e0ad 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1021,16 +1021,15 @@
(ert-deftest compat-obarray-clear ()
;; obarray APIs are only available since 26
- (static-if (> emacs-major-version 25)
- (progn
- (let ((ob (obarray-make)))
- (should-not (obarray-get ob "sym1"))
- (should (intern "sym1" ob))
- (should (obarray-get ob "sym1"))
- (obarray-clear ob)
- (should-not (obarray-get ob "sym1"))
- (should (intern "sym2" ob))
- (should (obarray-get ob "sym2"))))))
+ (static-when (> emacs-major-version 25)
+ (let ((ob (obarray-make)))
+ (should-not (obarray-get ob "sym1"))
+ (should (intern "sym1" ob))
+ (should (obarray-get ob "sym1"))
+ (obarray-clear ob)
+ (should-not (obarray-get ob "sym1"))
+ (should (intern "sym2" ob))
+ (should (obarray-get ob "sym2")))))
(ert-deftest compat-gensym ()
(let ((orig gensym-counter))
@@ -1329,8 +1328,8 @@
(ert-deftest compat-obsolete-subr-native-elisp-p ()
(with-no-warnings
- (static-if (< emacs-major-version 30)
- (should-not (subr-native-elisp-p (symbol-function 'identity))))))
+ (static-when (< emacs-major-version 30)
+ (should-not (subr-native-elisp-p (symbol-function 'identity))))))
(ert-deftest compat-closurep ()
(should (interpreted-function-p (eval '(lambda (x) x) t)))