[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 191a0bcf636 2/2: Merge branch 'master' of git.savannah.gnu.org:/s
From: |
Eli Zaretskii |
Subject: |
master 191a0bcf636 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs |
Date: |
Wed, 8 Jan 2025 08:44:20 -0500 (EST) |
branch: master
commit 191a0bcf636218a32eaeff41c1c39f06658755fc
Merge: a427927123c 67be8db5188
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
lisp/subr.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 5be8d8f52d4..84e8bbd14ad 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2643,7 +2643,8 @@ SYMBOL is checked for nil."
(defmacro when-let* (varlist &rest body)
"Bind variables according to VARLIST and conditionally evaluate BODY.
Evaluate each binding in turn, stopping if a binding value is nil.
-If all are non-nil, return the value of the last form in BODY.
+If all are non-nil, evaluate the forms in BODY
+and return the value of the last form.
The variable list VARLIST is the same as in `if-let*'.
@@ -2653,8 +2654,12 @@ See also `and-let*'."
(defmacro and-let* (varlist &rest body)
"Bind variables according to VARLIST and conditionally evaluate BODY.
-Like `when-let*', except if BODY is empty and all the bindings
-are non-nil, then the result is the value of the last binding.
+Evaluate each binding in turn, stopping if a binding value is nil.
+If all bindings are non-nil, evaluate the forms in BODY
+and return the value of the last form, or else the last binding value
+if BODY is empty.
+
+Like `when-let*', except for the handling of an empty BODY.
Some Lisp programmers follow the convention that `and' and `and-let*'
are for forms evaluated for return value, and `when' and `when-let*' are
@@ -2690,7 +2695,8 @@ binding."
(defmacro when-let (spec &rest body)
"Bind variables according to SPEC and conditionally evaluate BODY.
Evaluate each binding in turn, stopping if a binding value is nil.
-If all are non-nil, return the value of the last form in BODY.
+If all are non-nil, evaluate the forms in BODY
+and return the value of the last form.
The variable list SPEC is the same as in `if-let'."
(declare (indent 1) (debug if-let)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 191a0bcf636 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs,
Eli Zaretskii <=