diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-04 20:09:01 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-04 20:09:01 +0100 |
| commit | ec19e4e9187d87149d08a6f6e59def490d099d96 (patch) | |
| tree | 2b87befe378ffce90c19c9cdd1dd483c130071ee /compat-macs.el | |
| parent | f0362f354c03beeb677660ce1441c53e25a29191 (diff) | |
compat-macs: Require subr-x
Diffstat (limited to 'compat-macs.el')
| -rw-r--r-- | compat-macs.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compat-macs.el b/compat-macs.el index 5a034af..c40f473 100644 --- a/compat-macs.el +++ b/compat-macs.el @@ -21,6 +21,10 @@ ;;; Code: +;; We always require subr-x at compile since many functions have been moved +;; around. +(require 'subr-x) + (defvar compat--current-version nil "Default version to use when no explicit version was given.") @@ -33,9 +37,7 @@ "Protect BODY with `with-eval-after-load' if FEATURE is non-nil." (declare (indent 1)) (if feature - ;; See https://nullprogram.com/blog/2018/02/22/: - `(with-eval-after-load ',feature - ,@body) + `(with-eval-after-load ',feature ,@body) (macroexp-progn body))) (defun compat--generate (name def-fn install-fn check-fn attr) @@ -84,11 +86,9 @@ ignored: (when (and (plist-get attr :realname) (string= name (plist-get attr :realname))) (error "%S: Name is equal to realname" name)) - ;; We always require subr-x for the check since many functions have been - ;; moved around + ;; subr-x is available at compile time. (when (eq feature 'subr-x) (error "Feature subr-x is forbidden")) - (require 'subr-x) (when feature (unless (require feature nil t) (setq feature nil))) |
