[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat b7a6a179b2 1/3: Move require advice from 25.1 to
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat b7a6a179b2 1/3: Move require advice from 25.1 to 24.4 |
Date: |
Sun, 27 Feb 2022 16:57:20 -0500 (EST) |
branch: externals/compat
commit b7a6a179b20e6b0c191061fe5a10d573fc931fcf
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Move require advice from 25.1 to 24.4
---
compat-24.4.el | 14 ++++++++++++++
compat-25.1.el | 12 ------------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/compat-24.4.el b/compat-24.4.el
index 338513fbaa..dbcbc92d1e 100644
--- a/compat-24.4.el
+++ b/compat-24.4.el
@@ -172,5 +172,19 @@ Defaults to `error'."
(delete-dups (copy-sequence (cons name conditions))))
(when message (put name 'error-message message))))
+;;;; Defined in subr-x.el
+
+(compat-advise require (feature &rest args)
+ "Allow for Emacs 24.x to require the inexistent FEATURE subr-x."
+ ;; As the compatibility advise around `require` is more a hack than
+ ;; of of actual value, the highlighting is suppressed.
+ :no-highlight t
+ (if (eq feature 'subr-x)
+ (let ((entry (assq feature after-load-alist)))
+ (let ((load-file-name nil))
+ (dolist (form (cdr entry))
+ (funcall (eval form t)))))
+ (apply oldfun feature args)))
+
(provide 'compat-24.4)
;;; compat-24.4.el ends here
diff --git a/compat-25.1.el b/compat-25.1.el
index 9d2859dc40..2df84e7430 100644
--- a/compat-25.1.el
+++ b/compat-25.1.el
@@ -108,18 +108,6 @@ Equality with KEY is tested by TESTFN, defaulting to `eq'."
;;;; Defined in subr-x.el
-(compat-advise require (feature &rest args)
- "Allow for Emacs 24.x to require the inexistent FEATURE subr-x."
- ;; As the compatibility advise around `require` is more a hack than
- ;; of of actual value, the highlighting is suppressed.
- :no-highlight t
- (if (eq feature 'subr-x)
- (let ((entry (assq feature after-load-alist)))
- (let ((load-file-name nil))
- (dolist (form (cdr entry))
- (funcall (eval form t)))))
- (apply oldfun feature args)))
-
(compat-defmacro if-let* (varlist then &rest else)
"Bind variables according to VARLIST and evaluate THEN or ELSE.
This is like `if-let' but doesn't handle a VARLIST of the form