[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 89abffe 437/439: Make it explicit that not all VAL
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 89abffe 437/439: Make it explicit that not all VALS are evalled in -if-let* |
Date: |
Tue, 04 Aug 2015 20:31:50 +0000 |
branch: externals/dash
commit 89abffed98771ddb0a8aa199d845aabbccd36a47
Author: Clément Pit--Claudel <address@hidden>
Commit: Matus Goljer <address@hidden>
Make it explicit that not all VALS are evalled in -if-let*
I was not initially sure whether something like
(-when-let* ((a (subr-that-could-return-nil))
(b (blow-up-if-arg-is-nil a)))
(message "All safe"))
would work properly. It does, so edit the docs (and that of `if-let*') to
make it clear.
Initially mentioned in #142.
---
dash.el | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dash.el b/dash.el
index 342d4a9..772a629 100644
--- a/dash.el
+++ b/dash.el
@@ -1674,7 +1674,9 @@ See `-let' for the description of destructuring
mechanism."
VARS and do THEN, otherwise do ELSE. VARS-VALS should be a list
of (VAR VAL) pairs.
-Note: binding is done according to `-let*'."
+Note: binding is done according to `-let*'. VALS are evaluated
+sequentially, and evaluation stops after the first nil VAL is
+encountered."
(declare (debug ((&rest (sexp form)) form body))
(indent 2))
(->> vars-vals
@@ -1707,7 +1709,9 @@ otherwise do ELSE."
VARS and execute body. VARS-VALS should be a list of (VAR VAL)
pairs.
-Note: binding is done according to `-let*'."
+Note: binding is done according to `-let*'. VALS are evaluated
+sequentially, and evaluation stops after the first nil VAL is
+encountered."
(declare (debug ((&rest (sexp form)) body))
(indent 1))
`(-if-let* ,vars-vals (progn ,@body)))
- [elpa] externals/dash c34e4ab 394/439: Update invalid tests, (continued)
- [elpa] externals/dash c34e4ab 394/439: Update invalid tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 07f0358 392/439: Add test case operator !!> for expected errors, Phillip Lord, 2015/08/04
- [elpa] externals/dash 92ed7ff 391/439: Use vendored ert only on emacs23, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7aec562 430/439: Merge pull request #140 from mijoharas/master, Phillip Lord, 2015/08/04
- [elpa] externals/dash 63d2db9 431/439: make ->>'s second arg optional, Phillip Lord, 2015/08/04
- [elpa] externals/dash 45bd985 427/439: Reimplementation of --group-by., Phillip Lord, 2015/08/04
- [elpa] externals/dash aa13c07 429/439: fixed typo in docs (first where it should be last, Phillip Lord, 2015/08/04
- [elpa] externals/dash 70caa37 432/439: Merge pull request #144 from cammsaul/thread_last_make_second_arg_optional, Phillip Lord, 2015/08/04
- [elpa] externals/dash 1677338 428/439: Merge pull request #138 from phillord/fix/group-by-write-out, Phillip Lord, 2015/08/04
- [elpa] externals/dash e468937 435/439: Formatting, Phillip Lord, 2015/08/04
- [elpa] externals/dash 89abffe 437/439: Make it explicit that not all VALS are evalled in -if-let*,
Phillip Lord <=
- [elpa] externals/dash b88cfb7 436/439: Add dash prefix to epsilon variable., Phillip Lord, 2015/08/04
- [elpa] externals/dash eadb265 439/439: Swap examples to better show how -some-> works, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2aeeacb 433/439: Release 2.11.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash c3cf98d 438/439: Add `-some->`, `-some->>`, and `-some-->` macros., Phillip Lord, 2015/08/04
- [elpa] externals/dash 1c2f43d 434/439: Add "See also" for the reduce family, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2b69c14 411/439: Add dash.info and dash.texi to repo, Phillip Lord, 2015/08/04
- [elpa] externals/dash e574465 404/439: Add `-some`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4640a2a 405/439: Allow for approx comparison of floats in tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3b63476 412/439: Move anaphoric function intro up into Functions section, Phillip Lord, 2015/08/04
- [elpa] externals/dash 19fbc24 426/439: Fix anaphoric -spice-list macro, Phillip Lord, 2015/08/04