[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 9ec1a02 354/426: [-let] Abstract the _ test into a
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 9ec1a02 354/426: [-let] Abstract the _ test into a function |
Date: |
Tue, 04 Aug 2015 19:38:50 +0000 |
branch: externals/dash
commit 9ec1a0229b3a23e55350a914d393799d17ad9810
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>
[-let] Abstract the _ test into a function
---
dash.el | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dash.el b/dash.el
index 5abfe54..a6d1a3b 100644
--- a/dash.el
+++ b/dash.el
@@ -1174,6 +1174,11 @@ otherwise do ELSE."
`(let ((it ,val))
(if it ,then ,@else)))
+(defun dash--match-ignore-place-p (symbol)
+ "Return non-nil if SYMBOL is a symbol and starts with _."
+ (and (symbolp symbol)
+ (eq (aref (symbol-name symbol) 0) ?_)))
+
(defun dash--match-cons-skip-cdr (skip-cdr source)
"Helper function generating idiomatic shifting code."
(cond
@@ -1248,8 +1253,7 @@ SOURCE is a proper or improper list."
((and (symbolp (car match-form))
(eq (car match-form) '&keys))
(dash--match-kv (cons '&plist (cdr match-form))
(dash--match-cons-get-cdr skip-cdr source)))
- ((and (symbolp (car match-form))
- (eq (aref (symbol-name (car match-form)) 0) ?_))
+ ((dash--match-ignore-place-p (car match-form))
(dash--match-cons-1 (cdr match-form) source
(plist-put props :skip-cdr (1+ skip-cdr))))
(t
- [elpa] externals/dash 9065e1b 344/426: [-let] Final cdr shift optimization, (continued)
- [elpa] externals/dash 9065e1b 344/426: [-let] Final cdr shift optimization, Phillip Lord, 2015/08/04
- [elpa] externals/dash d37947a 332/426: Add -tree-seq, Phillip Lord, 2015/08/04
- [elpa] externals/dash 51a0c9f 350/426: [-let] Fix expansion of _ symbols in vector matcher, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8f9fc41 340/426: Add support for multiple input arguments to -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7f2b3c7 343/426: [-lambda] test all match-forms before converting to regular lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f81492 346/426: [-lambda] Better error-handling, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f0bb7d 348/426: [-let] Fix dynamic scoping issue, Phillip Lord, 2015/08/04
- [elpa] externals/dash f939201 347/426: [-let] Optimize shifting/binding of unused _ places, Phillip Lord, 2015/08/04
- [elpa] externals/dash c1d555b 355/426: [-let] Optimize single-binding of vectors and kv, Phillip Lord, 2015/08/04
- [elpa] externals/dash edb1e31 356/426: [-let] Add more tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9ec1a02 354/426: [-let] Abstract the _ test into a function,
Phillip Lord <=
- [elpa] externals/dash 31f321a 358/426: Release 2.9.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 40849a7 357/426: [-let] Remove stale comment, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2626840 336/426: Add -fixfn, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2436bf8 361/426: Add debug declaration on -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4d67b25 345/426: [-let] Do not reinvent `pop', Phillip Lord, 2015/08/04
- [elpa] externals/dash f7664c6 352/426: [-let] Add &keys support for cons matcher, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4b63be1 362/426: Declare --mapcat macro before using it. #102, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0310e0e 359/426: Update docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0fc5d73 351/426: [-let] Make the cons matcher temp-bind as late as possible, Phillip Lord, 2015/08/04
- [elpa] externals/dash 75d29a2 363/426: Declare --iterate macro before using it. #102, Phillip Lord, 2015/08/04