[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 51a0c9f 350/439: [-let] Fix expansion of _ symbols
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 51a0c9f 350/439: [-let] Fix expansion of _ symbols in vector matcher |
Date: |
Tue, 04 Aug 2015 20:30:13 +0000 |
branch: externals/dash
commit 51a0c9f64fd33b733421a6c11afe3fbd2dc677d4
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>
[-let] Fix expansion of _ symbols in vector matcher
---
dash.el | 3 ++-
dev/examples.el | 2 ++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dash.el b/dash.el
index 0b3474f..c456b88 100644
--- a/dash.el
+++ b/dash.el
@@ -1306,7 +1306,8 @@ is discarded."
;; do not match symbols starting with _
(not (eq (aref (symbol-name m) 0) ?_)))
(list (list m `(aref ,source ,i))))
- (t (dash--match m `(aref ,source ,i))))
+ ((not (symbolp m))
+ (dash--match m `(aref ,source ,i))))
re)
(setq i (1+ i))))
(-flatten-n 1 (nreverse re))))
diff --git a/dev/examples.el b/dev/examples.el
index d29c707..ba09d1f 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -720,6 +720,8 @@ new list."
(list bar face inv)) => '(2 foo-face t)
(-let [(a (b c) d) (list 1 (list 2 3) 4 5 6)] (list a b c d)) => '(1 2 3 4)
(-let [[a _ c] [1 2 3 4]] (list a c)) => '(1 3)
+ (-let [[_ _ _ a] (vector 1 2 3 4)] a) => 4
+ (-let [[a _ _ _ b] (vector 1 2 3 4 5)] (list a b)) => '(1 5)
(-let [[a (b c) d] [1 (2 3) 4]] (list a b c d)) => '(1 2 3 4)
(-let [[a b c] (string ?f ?o ?b ?a ?r)] (list a b c)) => '(?f ?o ?b)
(-let [[a b c] "abcdef"] (list a b c)) => '(?a ?b ?c)
- [elpa] externals/dash 8f9fc41 340/439: Add support for multiple input arguments to -lambda, (continued)
- [elpa] externals/dash 8f9fc41 340/439: Add support for multiple input arguments to -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 05fa92f 342/439: [-let] Transpose nreverse/flatten, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7f2b3c7 343/439: [-lambda] test all match-forms before converting to regular lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 947ffda 341/439: Add support for &rest match for non-list sequences (like . for improper lists), Phillip Lord, 2015/08/04
- [elpa] externals/dash a4be872 338/439: Add `-let` and `-let*`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9065e1b 344/439: [-let] Final cdr shift optimization, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f81492 346/439: [-lambda] Better error-handling, Phillip Lord, 2015/08/04
- [elpa] externals/dash 65a3736 349/439: [-let] Fix improper list non-symbol last argument handler, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4d67b25 345/439: [-let] Do not reinvent `pop', Phillip Lord, 2015/08/04
- [elpa] externals/dash f939201 347/439: [-let] Optimize shifting/binding of unused _ places, Phillip Lord, 2015/08/04
- [elpa] externals/dash 51a0c9f 350/439: [-let] Fix expansion of _ symbols in vector matcher,
Phillip Lord <=
- [elpa] externals/dash 0fc5d73 351/439: [-let] Make the cons matcher temp-bind as late as possible, Phillip Lord, 2015/08/04
- [elpa] externals/dash f7664c6 352/439: [-let] Add &keys support for cons matcher, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f0bb7d 348/439: [-let] Fix dynamic scoping issue, Phillip Lord, 2015/08/04
- [elpa] externals/dash db7f651 353/439: [-let] Simplify the conditions in dash--match-cons-1, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9ec1a02 354/439: [-let] Abstract the _ test into a function, Phillip Lord, 2015/08/04
- [elpa] externals/dash c1d555b 355/439: [-let] Optimize single-binding of vectors and kv, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0310e0e 359/439: Update docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash 40849a7 357/439: [-let] Remove stale comment, Phillip Lord, 2015/08/04
- [elpa] externals/dash edb1e31 356/439: [-let] Add more tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4b63be1 362/439: Declare --mapcat macro before using it. #102, Phillip Lord, 2015/08/04