[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 2a94ea5 209/316: Remove unnecessary helper functio
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash 2a94ea5 209/316: Remove unnecessary helper function |
Date: |
Mon, 15 Feb 2021 15:58:01 -0500 (EST) |
branch: externals/dash
commit 2a94ea548063811e38ad4065ad3c6f216dfb4dd7
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Remove unnecessary helper function
* dash.el (dash--vector-tail): Remove.
(dash--match-vector-1, dash--match): Replace it with substring,
which works for both strings and vectors.
---
dash.el | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/dash.el b/dash.el
index 840e704..c605df2 100644
--- a/dash.el
+++ b/dash.el
@@ -1710,17 +1710,6 @@ SOURCE is a proper or improper list."
(t ;; Handle improper lists. Last matching place, no need for shift
(dash--match match-form (dash--match-cons-get-cdr skip-cdr source))))))
-(defun dash--vector-tail (seq start)
- "Return the tail of SEQ starting at START."
- (cond
- ((vectorp seq)
- (let* ((re-length (- (length seq) start))
- (re (make-vector re-length 0)))
- (--dotimes re-length (aset re it (aref seq (+ it start))))
- re))
- ((stringp seq)
- (substring seq start))))
-
(defun dash--match-vector (match-form source)
"Setup a vector matching environment and call the real matcher."
(let ((s (dash--match-make-source-symbol)))
@@ -1768,7 +1757,7 @@ is discarded."
(eq m '&rest))
(prog1 (dash--match
(aref match-form (1+ i))
- `(dash--vector-tail ,source ,i))
+ `(substring ,source ,i))
(setq i l)))
((and (symbolp m)
;; do not match symbols starting with _
@@ -1919,7 +1908,7 @@ Key-value stores are disambiguated by placing a token
&plist,
(eq '&as (aref match-form 1)))
(let ((s (aref match-form 0)))
(cons (list s source)
- (dash--match (dash--vector-tail match-form 2) s))))
+ (dash--match (substring match-form 2) s))))
(t (dash--match-vector match-form source))))))
(defun dash--normalize-let-varlist (varlist)
- [elpa] externals/dash f800e2e 186/316: Prefer declare forms over lisp-indent-function, (continued)
- [elpa] externals/dash f800e2e 186/316: Prefer declare forms over lisp-indent-function, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2da2304 188/316: Remove generated manual dash.info, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 713fd6c 193/316: Merge pull request #354 from blc/takedrop, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 770121b 195/316: Update copyright notices with HTTPS links, ELPA Syncer, 2021/02/15
- [elpa] externals/dash b4ab366 194/316: Merge pull request #355 from blc/info, ELPA Syncer, 2021/02/15
- [elpa] externals/dash e8ed3d6 196/316: * watch-tests.watchr: Remove file., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 814c407 198/316: * dev/.nosearch: Document file's purpose., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 018d30c 200/316: Update all library headers for 2021, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2200db0 204/316: Various Texinfo manual improvements, ELPA Syncer, 2021/02/15
- [elpa] externals/dash e8cc2ec 205/316: Merge pull request #358 from blc/texi, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2a94ea5 209/316: Remove unnecessary helper function,
ELPA Syncer <=
- [elpa] externals/dash adf3a0d 208/316: Merge pull request #359 from blc/make, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1d58249 212/316: Write -iterate in terms of --iterate, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 47f8b2b 214/316: Clean up -doto, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 794bf8c 219/316: ; Fix omission in last change, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f9d67ae 223/316: Merge pull request #314 from blc/reductions, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 31a655b 224/316: Fix -cons* with no arguments, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3423be4 227/316: Merge pull request #364 from blc/info-look, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 558cd95 230/316: Fix take/drop splits (again), ELPA Syncer, 2021/02/15
- [elpa] externals/dash f975634 233/316: Merge pull request #235, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 8248997 234/316: Merge pull request #207 from holomorph/iota, ELPA Syncer, 2021/02/15