[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 9ec1a02 354/439: [-let] Abstract the _ test into a
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 9ec1a02 354/439: [-let] Abstract the _ test into a function |
Date: |
Tue, 04 Aug 2015 20:30:20 +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/439: [-let] Final cdr shift optimization, (continued)
- [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, 2015/08/04
- [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 <=
- [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
- [elpa] externals/dash 31f321a 358/439: Release 2.9.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2436bf8 361/439: Add debug declaration on -lambda, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9e1a667 360/439: Do not map nodes on conses (be consistent with tree map), Phillip Lord, 2015/08/04
- [elpa] externals/dash 75d29a2 363/439: Declare --iterate macro before using it. #102, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3bdf60b 365/439: Add some examples, Phillip Lord, 2015/08/04