aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat-24.el4
-rw-r--r--compat-25.el2
-rw-r--r--compat-26.el2
-rw-r--r--compat-27.el10
-rw-r--r--compat-28.el2
-rw-r--r--compat-macs.el13
-rw-r--r--compat-tests.el6
-rw-r--r--compat.el17
8 files changed, 19 insertions, 37 deletions
diff --git a/compat-24.el b/compat-24.el
index 2a4e8a8..e6ca792 100644
--- a/compat-24.el
+++ b/compat-24.el
@@ -478,7 +478,7 @@ function for defining FACE and recalculating its attributes."
(unless spec-type
(setq spec-type 'face-override-spec))
(if (memq spec-type '(face-defface-spec face-override-spec
- customized-face saved-face))
+ customized-face saved-face))
(put face spec-type spec))
(if (memq spec-type '(reset saved-face))
(put face 'customized-face nil))
@@ -495,5 +495,5 @@ function for defining FACE and recalculating its attributes."
(dolist (frame (frame-list))
(face-spec-recalc face frame)))
-(compat--inhibit-prefixed (provide 'compat-24))
+(provide 'compat-24)
;;; compat-24.el ends here
diff --git a/compat-25.el b/compat-25.el
index 181dada..84ef300 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -340,5 +340,5 @@ recursion."
(push (concat dir "/" file) files)))))
(nconc result (nreverse files))))
-(compat--inhibit-prefixed (provide 'compat-25))
+(provide 'compat-25)
;;; compat-25.el ends here
diff --git a/compat-26.el b/compat-26.el
index 127777c..eb3bd5e 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -671,5 +671,5 @@ optional DESCRIPTION field."
(sit-for 1))
choice)))
-(compat--inhibit-prefixed (provide 'compat-26))
+(provide 'compat-26)
;;; compat-26.el ends here
diff --git a/compat-27.el b/compat-27.el
index 9202d5c..0997597 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -494,14 +494,14 @@ Elements of ALIST that are not conses are ignored."
:prefix t
(unless test (setq test #'equal))
(while (and (consp (car alist))
- (funcall test (caar alist) key))
+ (funcall test (caar alist) key))
(setq alist (cdr alist)))
(let ((tail alist) tail-cdr)
(while (setq tail-cdr (cdr tail))
(if (and (consp (car tail-cdr))
- (funcall test (caar tail-cdr) key))
- (setcdr tail (cdr tail-cdr))
- (setq tail tail-cdr))))
+ (funcall test (caar tail-cdr) key))
+ (setcdr tail (cdr tail-cdr))
+ (setq tail tail-cdr))))
alist)
;;;; Defined in simple.el
@@ -1001,5 +1001,5 @@ and if a matching region is found, place point at the start of the region."
(and (not (eq ended t))
ended))))))
-(compat--inhibit-prefixed (provide 'compat-27))
+(provide 'compat-27)
;;; compat-27.el ends here
diff --git a/compat-28.el b/compat-28.el
index fc877b4..6213d7b 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -878,5 +878,5 @@ are 30 days long."
(* (or (nth 4 time) 0) 60 60 24 30)
(* (or (nth 5 time) 0) 60 60 24 365)))
-(compat--inhibit-prefixed (provide 'compat-28))
+(provide 'compat-28)
;;; compat-28.el ends here
diff --git a/compat-macs.el b/compat-macs.el
index 75a2e9a..e0220dd 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -29,17 +29,6 @@
"Ignore all arguments."
nil)
-(defvar compat--inhibit-prefixed nil
- "Non-nil means that prefixed definitions are not loaded.
-A prefixed function is something like `compat-assoc', that is
-only made visible when the respective compatibility version file
-is loaded (in this case `compat-26').")
-
-(defmacro compat--inhibit-prefixed (&rest body)
- "Ignore BODY unless `compat--inhibit-prefixed' is true."
- `(unless (bound-and-true-p compat--inhibit-prefixed)
- ,@body))
-
(defvar compat-current-version nil
"Default version to use when no explicit version was given.")
@@ -114,7 +103,7 @@ DEF-FN, INSTALL-FN, CHECK-FN, ATTR and TYPE."
(version< max-version emacs-version)))
'(compat--ignore))
((plist-get attr :prefix)
- '(compat--inhibit-prefixed))
+ '(progn))
((and version (version<= version emacs-version) (not cond))
'(compat--ignore))
(`(when (and ,(if cond cond t)
diff --git a/compat-tests.el b/compat-tests.el
index cdbe9af..3594cf8 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -70,7 +70,7 @@ DEF-FN, INSTALL-FN, CHECK-FN, ATTR and TYPE."
(version< max-version emacs-version)))
'(compat--ignore))
((plist-get attr :prefix)
- '(compat--inhibit-prefixed))
+ '(progn))
((and version (version<= version emacs-version) (not cond))
'(compat--ignore))
(`(when (and ,(if cond cond t)
@@ -82,9 +82,7 @@ DEF-FN, INSTALL-FN, CHECK-FN, ATTR and TYPE."
(setq compat--generate-function #'compat--generate-testable)
-(defvar compat-testing)
-(let ((compat-testing t))
- (load "compat.el"))
+(require 'compat)
(defvar compat-test-counter)
diff --git a/compat.el b/compat.el
index cfe3bf7..7c400ce 100644
--- a/compat.el
+++ b/compat.el
@@ -40,17 +40,12 @@
;;; Code:
-(defvar compat--inhibit-prefixed)
-(let ((compat--inhibit-prefixed (not (bound-and-true-p compat-testing))))
- ;; Instead of using `require', we manually check `features' and call
- ;; `load' to avoid the issue of not using `provide' at the end of
- ;; 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 (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)))))
+(require 'compat-24)
+(require 'compat-25)
+(require 'compat-26)
+(require 'compat-27)
+(require 'compat-28)
+(require 'compat-29)
(provide 'compat)
;;; compat.el ends here