[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat c177ff5e83 17/84: Reuse ntake in take definition
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat c177ff5e83 17/84: Reuse ntake in take definition |
Date: |
Tue, 3 Jan 2023 08:57:31 -0500 (EST) |
branch: externals/compat
commit c177ff5e83e26ee721a9e5c33b6d7e6b2dc110fa
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Reuse ntake in take definition
---
compat-29.el | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/compat-29.el b/compat-29.el
index 0ac82bbe76..5ec5680311 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -65,6 +65,7 @@ the properties at POSITION."
If N is zero or negative, return nil.
If N is greater or equal to the length of LIST, return LIST unmodified.
Otherwise, return LIST after truncating it."
+ :realname compat--ntake-elisp
(and (> n 0) (let ((cons (nthcdr (1- n) list)))
(when cons (setcdr cons nil))
list)))
@@ -73,10 +74,7 @@ Otherwise, return LIST after truncating it."
"Return the first N elements of LIST.
If N is zero or negative, return nil.
If N is greater or equal to the length of LIST, return LIST (or a copy)."
- (setq list (copy-sequence list)) ;FIXME: only copy as much as necessary
- (and (> n 0) (let ((cons (nthcdr (1- n) list)))
- (when cons (setcdr cons nil))
- list)))
+ (compat--ntake-elisp n (copy-sequence list))) ;FIXME: only copy as much
as necessary
;;;; Defined in subr.el
- [elpa] externals/compat 3f3f2e44d5 43/84: Split compat-insert-into-buffer into multiple tests, (continued)
- [elpa] externals/compat 3f3f2e44d5 43/84: Split compat-insert-into-buffer into multiple tests, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 933d6fdf80 24/84: Add buffer-match-p from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 8d17ffdd88 29/84: Add file-has-changed-p from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 252d33e897 31/84: Fix incompatible function calls in compat-29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 9e0eb5b72f 33/84: Add compat-declare-version to compat-29.el, ELPA Syncer, 2023/01/03
- [elpa] externals/compat fdae099b00 34/84: Move if-let and related function from subr-x to subr, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 6ac6ed2a99 36/84: Use make-symbol instead of gensym in function-alias-p tests, ELPA Syncer, 2023/01/03
- [elpa] externals/compat ef5246cf55 38/84: Fix issues related to 'expect' tests, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 0a84a7c219 48/84: Add add-display-text-property from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat e6d279af18 14/84: Extend byte-compile-docstring-max-column to 100, ELPA Syncer, 2023/01/03
- [elpa] externals/compat c177ff5e83 17/84: Reuse ntake in take definition,
ELPA Syncer <=
- [elpa] externals/compat 0de389aca6 19/84: Add string-equal-ignore-case from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat ff331f6c29 22/84: Add prefixed plist-put from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 9aac0f55d1 23/84: Add prefixed plist-member from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 9ab3081959 26/84: Add string-pixel-width from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat d375504e3c 27/84: Add with-buffer-unmodified-if-unchanged from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat ded0f01036 40/84: Revert "Fix gv-expander for compat-alist-get", ELPA Syncer, 2023/01/03
- [elpa] externals/compat 878221eabd 44/84: Update the commentary section for compat-29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 4a56adbcdf 42/84: Remove references to the deleted "Emacs 24.5" node, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 0c14c42bc1 50/84: Copy edebug specifications instead of referencing, ELPA Syncer, 2023/01/03
- [elpa] externals/compat b888c2fb49 53/84: Replace when-let with expansions in compat-29, ELPA Syncer, 2023/01/03