[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat c0d5634570 80/84: Simplify loading procedure
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat c0d5634570 80/84: Simplify loading procedure |
Date: |
Tue, 3 Jan 2023 08:57:40 -0500 (EST) |
branch: externals/compat
commit c0d5634570d65bce07c8fb60e5b29106c379fc43
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Simplify loading procedure
Instead of modifying the name of the file we pass to 'load', we modify
the order of contents in 'load-suffixes' and ensure that .el files are
preferred over .elc files, thus preventing that the macro-expanded
files are used, which prevents definitions form being loaded.
---
compat-tests.el | 1 +
compat.el | 10 ++++------
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index 6cc5ed9c1a..2733a48b95 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -60,6 +60,7 @@ DEF-FN, INSTALL-FN, CHECK-FN, ATTR and TYPE."
(defvar compat-testing)
(let ((compat--generate-function #'compat--generate-testable)
+ (load-suffixes '(".el" ".elc"))
(compat-testing t))
(load "compat.el"))
diff --git a/compat.el b/compat.el
index ab490cbc98..ba2855fc39 100644
--- a/compat.el
+++ b/compat.el
@@ -47,12 +47,10 @@
;; the file (which is disabled by `compat--inhibit-prefixed', so
;; that the file can be loaded again at some later point when the
;; prefixed definitions are needed).
- (dolist (vers '(24 25 26 27 28 29))
- (unless (memq (intern (format "compat-%d" vers)) features)
- (load (format "compat-%d%s" vers
- (if (bound-and-true-p compat-testing)
- ".el" ""))
- nil t))))
+ (dolist (version '(24 25 26 27 28 29))
+ (let ((feature-name (format "compat-%d" version)))
+ (unless (memq (intern feature-name) features)
+ (load feature-name nil t)))))
(provide 'compat)
;;; compat.el ends here
- [elpa] externals/compat 62ec50bdd1 83/84: Merge branch 'emacs-29.1', (continued)
- [elpa] externals/compat 62ec50bdd1 83/84: Merge branch 'emacs-29.1', ELPA Syncer, 2023/01/03
- [elpa] externals/compat accc689c7e 20/84: Remove nonsensical file-parent-directory test comment, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 8b3d3ea5c8 32/84: Merge branch 'master' into emacs-29.1, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 5c0c55c20d 47/84: Document missing functionality from compat-29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 26cf72e36a 49/84: Explicitly denote subr-x functions with :feature, ELPA Syncer, 2023/01/03
- [elpa] externals/compat b4f38aa5ab 55/84: Copy if-let/if-let* definitions into if-let/when-let, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 9e14c2f2df 56/84: Remove realname for if-let, ELPA Syncer, 2023/01/03
- [elpa] externals/compat c96aa66fb4 57/84: Remove realname for if-let*, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 3bd425a0d6 67/84: Prevent compat-macs.el from being byte compiled, ELPA Syncer, 2023/01/03
- [elpa] externals/compat e96cd14210 72/84: Have Makefile targets rebuild .elc files not .el, ELPA Syncer, 2023/01/03
- [elpa] externals/compat c0d5634570 80/84: Simplify loading procedure,
ELPA Syncer <=
- [elpa] externals/compat be4595fec8 84/84: Update README to reflect the move from SourceHut to GitHub, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 6aad62a6b8 77/84: Split plain unit tests into "ref" (real) and "impl" (compat) tests, ELPA Syncer, 2023/01/03