[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 6f81492 346/426: [-lambda] Better error-handling
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 6f81492 346/426: [-lambda] Better error-handling |
Date: |
Tue, 04 Aug 2015 19:38:47 +0000 |
branch: externals/dash
commit 6f8149237340ac291ca3486a18ebe619344d4fc9
Author: Matus Goljer <address@hidden>
Commit: Matus Goljer <address@hidden>
[-lambda] Better error-handling
---
dash.el | 2 +-
dev/examples.el | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dash.el b/dash.el
index 7898dc9..6434fa0 100644
--- a/dash.el
+++ b/dash.el
@@ -1459,7 +1459,7 @@ penalty.
See `-let' for the description of destructuring mechanism."
(cond
((not (consp match-form))
- (error "match-form must be a list"))
+ (signal 'wrong-type-argument "match-form must be a list"))
;; no destructuring, so just return regular lambda to make things faster
((-all? 'symbolp match-form)
`(lambda ,match-form ,@body))
diff --git a/dev/examples.el b/dev/examples.el
index ae4c643..de85ca3 100644
--- a/dev/examples.el
+++ b/dev/examples.el
@@ -739,7 +739,7 @@ new list."
(progn
(list a b c d)
(error "previous call should fail.")))
- (error t)) => t
+ (args-out-of-range t)) => t
(-let [(a . (b . c)) (cons 1 (cons 2 3))] (list a b c)) => '(1 2 3)
;; final cdr optimization
(-let [(((a))) (list (list (list 1 2) 3) 4)] a) => 1
@@ -772,7 +772,7 @@ new list."
(-map (-lambda ((&plist :a a :b b)) (+ a b)) '((:a 1 :b 2) (:a 3 :b 4) (:a
5 :b 6))) => '(3 7 11)
(-map (-lambda (x) (let ((k (car x)) (v (cadr x))) (+ k v))) '((1 2) (3 4)
(5 6))) => '(3 7 11)
(funcall (-lambda ((a) (b)) (+ a b)) '(1 2 3) '(4 5 6)) => 5
- (condition-case nil (progn (-lambda a t) (error "previous form should
error")) (error t)) => t
+ (condition-case nil (progn (-lambda a t) (error "previous form should
error")) (wrong-type-argument t)) => t
(funcall (-lambda (a b) (+ a b)) 1 2) => 3
(funcall (-lambda (a (b c)) (+ a b c)) 1 (list 2 3)) => 6))
- [elpa] externals/dash 9ebcce6 325/426: Add some niceties to font-locking of examples, (continued)
- [elpa] externals/dash 9ebcce6 325/426: Add some niceties to font-locking of examples, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6fc652d 331/426: Merge pull request #95 from Wilfred/shallow-copy-function, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5637bd6 322/426: Add alias from -find to -first, Phillip Lord, 2015/08/04
- [elpa] externals/dash a4be872 338/426: Add `-let` and `-let*`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 947ffda 341/426: Add support for &rest match for non-list sequences (like . for improper lists), Phillip Lord, 2015/08/04
- [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 <=
- [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, 2015/08/04
- [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