[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 02f4d3a795: compat-tests: Test that no unnecessa
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 02f4d3a795: compat-tests: Test that no unnecessary compat-* files are loaded |
Date: |
Fri, 6 Jan 2023 14:57:24 -0500 (EST) |
branch: externals/compat
commit 02f4d3a795fdfc9cf4da6086137e3bfa39747cba
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
compat-tests: Test that no unnecessary compat-* files are loaded
---
compat-tests.el | 7 +++++++
compat.el | 3 ++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/compat-tests.el b/compat-tests.el
index 5c76084bea..79dcc85434 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -45,6 +45,13 @@
(defmacro should-equal (a b)
`(should (equal ,a ,b)))
+(ert-deftest compat-loaded-features ()
+ (let ((version 0))
+ (while (< version 30)
+ (should-equal (> version emacs-major-version)
+ (featurep (intern (format "compat-%s" version))))
+ (setq version (1+ version)))))
+
(ert-deftest compat-function ()
(let ((sym (compat-function plist-put)) list)
(should sym)
diff --git a/compat.el b/compat.el
index 7e37e143f0..269b947920 100644
--- a/compat.el
+++ b/compat.el
@@ -42,7 +42,8 @@
;;; Code:
-(when (< emacs-major-version 29) (require 'compat-29))
+(when (eval-when-compile (< emacs-major-version 29))
+ (require 'compat-29))
(defmacro compat-function (fun)
"Return compatibility function symbol for FUN.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/compat 02f4d3a795: compat-tests: Test that no unnecessary compat-* files are loaded,
ELPA Syncer <=