[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat a57cfed 66/99: Avoid comparing alist-get with te
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat a57cfed 66/99: Avoid comparing alist-get with testfn if not available |
Date: |
Sun, 17 Oct 2021 05:57:58 -0400 (EDT) |
branch: externals/compat
commit a57cfed6316535dfb2e04d28be7286c9d1a098b3
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Avoid comparing alist-get with testfn if not available
---
compat-tests.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index f2a4114..d59658c 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -137,7 +137,10 @@ If FN is a list, the car should be the actual function,
and cadr
the compatibility function."
(declare (indent 1))
(if (consp fn)
- (setq compat--current-fn (car fn)
+ (setq compat--current-fn (if (symbolp (car fn))
+ (car fn)
+ ;; Handle expressions
+ (eval (car fn) t))
compat--compat-fn (cadr fn))
(setq compat--current-fn fn
compat--compat-fn nil))
@@ -646,8 +649,9 @@ the compatibility function."
(compat--should 'b 2 '(1 (2 . b) 3))
(compat--should nil 2 '((1 . a) 2 (3 . c)))
(compat--should 'a 1 '((3 . c) (2 . b) (1 . a)))
- (compat--should nil "a" '(("a" . 1) ("b" . 2) ("c" . 3))) ;non-primitive
elements
-
+ (compat--should nil "a" '(("a" . 1) ("b" . 2) ("c" . 3)))) ;non-primitive
elements
+ (compat-test ((and (version<= "26.1" emacs-version) #'alist-get)
+ compat--alist-get-full-elisp)
;; With testfn (advised behaviour):
(compat--should 1 "a" '(("a" . 1) ("b" . 2) ("c" . 3)) nil nil #'equal)
(compat--should 1 3 '((10 . 10) (4 . 4) (1 . 1) (9 . 9)) nil nil #'<)
- [elpa] externals/compat 56ad375 40/99: Declare macrop for macroexpand-1, (continued)
- [elpa] externals/compat 56ad375 40/99: Declare macrop for macroexpand-1, ELPA Syncer, 2021/10/17
- [elpa] externals/compat e4b57d2 28/99: Increase base version to 24.3, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 1430aaa 09/99: Add highlighting for compatibility code, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 79d4778 23/99: Use compat--string-trim-left in file-name-with-extension, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 156b5f5 27/99: Ensure substring is passed two arguments in string-width advise, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 14a3bce 39/99: Remove NonGNU ELPA installation code, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 6445814 51/99: Use compatibility functions in file-name-with-extension definition, ELPA Syncer, 2021/10/17
- [elpa] externals/compat fa1d0df 55/99: Use names of compatibility functions in ert docstrings, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 1d0f6db 56/99: Add compat-if-let* tests, ELPA Syncer, 2021/10/17
- [elpa] externals/compat c0c1889 57/99: Add compat-and-let* tests, ELPA Syncer, 2021/10/17
- [elpa] externals/compat a57cfed 66/99: Avoid comparing alist-get with testfn if not available,
ELPA Syncer <=
- [elpa] externals/compat 7d90061 21/99: Add made up macro name to macrop test, ELPA Syncer, 2021/10/17
- [elpa] externals/compat f3c5728 22/99: Wrap compat-tests setup in an eval-and-load block, ELPA Syncer, 2021/10/17
- [elpa] externals/compat eb0c027 26/99: Advise indirect-function to not raise void-function, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 797930f 34/99: Declare temporary-file-directory for make-nearby-temp-file, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 26acf1f 48/99: Use compatibility macros in ...-let definitions, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 8f64282 49/99: Use compatibility functions in string-trim definition, ELPA Syncer, 2021/10/17
- [elpa] externals/compat e6b5f08 53/99: Load all compatibility code unconditionally, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 021ffd1 59/99: Handle legacy bytecode argument lists, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 956db9b 60/99: Improve handling of conditional compatibility definitions, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 9be46b0 16/99: Add check for Emacs 28 to compat-tests.el, ELPA Syncer, 2021/10/17