emacs-elpa-diffs
[Top][All Lists]
Advanced

[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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]