[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat f57791877f 4/8: Use nth/nthcdr instead of cad+r/
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat f57791877f 4/8: Use nth/nthcdr instead of cad+r/cdd+r if possible |
Date: |
Sat, 5 Feb 2022 11:57:23 -0500 (EST) |
branch: externals/compat
commit f57791877f5d787d7097412b2c11a3d31e643cbf
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Use nth/nthcdr instead of cad+r/cdd+r if possible
This avoids byte compilation issues on versions of Emacs where
c[ad]{3,}r functions are not defined.
---
compat-28.1.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/compat-28.1.el b/compat-28.1.el
index df6c8e276b..f37f8c8025 100644
--- a/compat-28.1.el
+++ b/compat-28.1.el
@@ -443,8 +443,8 @@ as the new values of the bound variables in the recursive
invocation."
((eq (car-safe expr) 'if)
(append (list 'if
(cadr expr)
- (funcall tco (caddr expr)))
- (funcall tco-progn (cdddr expr))))
+ (funcall tco (nth 2 expr)))
+ (funcall tco-progn (nthcdr 3 expr))))
((eq (car-safe expr) 'cond)
(let ((conds (cdr expr)) body)
(while conds
@@ -466,12 +466,12 @@ as the new values of the bound variables in the recursive
invocation."
,(funcall tco (cons 'or (cddr expr))))))
(funcall tco (cadr expr))))
((eq (car-safe expr) 'condition-case)
- (append (list 'condition-case (cadr expr) (caddr expr))
+ (append (list 'condition-case (cadr expr) (nth 2 expr))
(mapcar
(lambda (handler)
(cons (car handler)
(funcall tco-progn (cdr handler))))
- (cdddr expr))))
+ (nthcdr 3 expr))))
((memq (car-safe expr) '(and progn))
(cons (car expr) (funcall tco-progn (cdr expr))))
((memq (car-safe expr) '(let let*))
- [elpa] externals/compat updated (f1be1fbdeb -> 503b13f1b1), ELPA Syncer, 2022/02/05
- [elpa] externals/compat f57791877f 4/8: Use nth/nthcdr instead of cad+r/cdd+r if possible,
ELPA Syncer <=
- [elpa] externals/compat 503b13f1b1 8/8: Add compat-help as an infrastructure to manage relevant notes, ELPA Syncer, 2022/02/05
- [elpa] externals/compat 0039912d8e 3/8: Remove unknown declare properties for Emacs 24 and prior, ELPA Syncer, 2022/02/05
- [elpa] externals/compat c7578e29f2 1/8: Use with-eval-after-load for updating default values, ELPA Syncer, 2022/02/05
- [elpa] externals/compat 711d678361 6/8: Fix eval-after-load call for delayed compatibility code, ELPA Syncer, 2022/02/05
- [elpa] externals/compat 839ed32445 2/8: Drop :max-version for alist-get in compat-25.1, ELPA Syncer, 2022/02/05
- [elpa] externals/compat 0125f90e64 7/8: Declare json-parse-string in compat-27.1, ELPA Syncer, 2022/02/05
- [elpa] externals/compat 1a53971919 5/8: Abbreviate doc-string for lookup-key advice, ELPA Syncer, 2022/02/05