[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e5634aa 8/8: Merge from origin/emacs-26
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master e5634aa 8/8: Merge from origin/emacs-26 |
Date: |
Sun, 2 Dec 2018 13:36:25 -0500 (EST) |
branch: master
commit e5634aae531ce932ecb8d84243d690c7ca89bec3
Merge: 5f6d7a4 745c9c0
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
Merge from origin/emacs-26
745c9c0 (origin/emacs-26) Revert "Revert "Fix infloop in GC mark_kboa...
c418c85 Revert "Fix infloop in GC mark_kboards"
8fa0d96 * lisp/emacs-lisp/subr-x.el (if-let, when-let): Doc fix: acti...
---
lisp/emacs-lisp/subr-x.el | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 20eb0d5..3d59af2 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -122,7 +122,7 @@ If ELT is of the form ((EXPR)), listify (EXPR) with a dummy
symbol."
bindings)))
(defmacro if-let* (varlist then &rest else)
- "Bind variables according to VARLIST and eval THEN or ELSE.
+ "Bind variables according to VARLIST and evaluate THEN or ELSE.
This is like `if-let' but doesn't handle a VARLIST of the form
\(SYMBOL SOMETHING) specially."
(declare (indent 2)
@@ -136,14 +136,14 @@ This is like `if-let' but doesn't handle a VARLIST of the
form
`(let* () ,then)))
(defmacro when-let* (varlist &rest body)
- "Bind variables according to VARLIST and conditionally eval BODY.
+ "Bind variables according to VARLIST and conditionally evaluate BODY.
This is like `when-let' but doesn't handle a VARLIST of the form
\(SYMBOL SOMETHING) specially."
(declare (indent 1) (debug if-let*))
(list 'if-let* varlist (macroexp-progn body)))
(defmacro and-let* (varlist &rest body)
- "Bind variables according to VARLIST and conditionally eval 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 non-nil."
(declare (indent 1)
@@ -157,22 +157,20 @@ are non-nil, then the result is non-nil."
`(let* () ,@(or body '(t))))))
(defmacro if-let (spec then &rest else)
- "Bind variables according to SPEC and eval THEN or ELSE.
-Each binding is evaluated in turn, and evaluation stops if a
-binding value is nil. If all are non-nil, the value of THEN is
-returned, or the last form in ELSE is returned.
+ "Bind variables according to SPEC and evaluate THEN or ELSE.
+Evaluate each binding in turn, stopping if a binding value is nil.
+If all are non-nil return the value of THEN, otherwise the last form in ELSE.
-Each element of SPEC is a list (SYMBOL VALUEFORM) which binds
+Each element of SPEC is a list (SYMBOL VALUEFORM) that binds
SYMBOL to the value of VALUEFORM. An element can additionally be
of the form (VALUEFORM), which is evaluated and checked for nil;
i.e. SYMBOL can be omitted if only the test result is of
interest. It can also be of the form SYMBOL, then the binding of
SYMBOL is checked for nil.
-As a special case, a SPEC of the form \(SYMBOL SOMETHING) is
-interpreted like \((SYMBOL SOMETHING)). This exists for backward
-compatibility with the old syntax that accepted only one
-binding."
+As a special case, interprets a SPEC of the form \(SYMBOL SOMETHING)
+like \((SYMBOL SOMETHING)). This exists for backward compatibility
+with an old syntax that accepted only one binding."
(declare (indent 2)
(debug ([&or (&rest [&or symbolp (symbolp form) (form)])
(symbolp form)]
@@ -184,10 +182,9 @@ binding."
(list 'if-let* spec then (macroexp-progn else)))
(defmacro when-let (spec &rest body)
- "Bind variables according to SPEC and conditionally eval BODY.
-Each binding is evaluated in turn, and evaluation stops if a
-binding value is nil. If all are non-nil, the value of the last
-form in BODY is returned.
+ "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.
The variable list SPEC is the same as in `if-let'."
(declare (indent 1) (debug if-let))
- [Emacs-diffs] master updated (92282cb -> e5634aa), Glenn Morris, 2018/12/02
- [Emacs-diffs] master 2064cd4 1/8: ; Merge from origin/emacs-26, Glenn Morris, 2018/12/02
- [Emacs-diffs] master fa9411e 3/8: ; Merge from origin/emacs-26, Glenn Morris, 2018/12/02
- [Emacs-diffs] master e8586d4 5/8: ; Merge from origin/emacs-26, Glenn Morris, 2018/12/02
- [Emacs-diffs] master e5634aa 8/8: Merge from origin/emacs-26,
Glenn Morris <=
- [Emacs-diffs] master 3895e22 4/8: Merge from origin/emacs-26, Glenn Morris, 2018/12/02
- [Emacs-diffs] master 4d66f9f 2/8: Merge from origin/emacs-26, Glenn Morris, 2018/12/02
- [Emacs-diffs] master 5f6d7a4 7/8: ; Merge from origin/emacs-26, Glenn Morris, 2018/12/02
- [Emacs-diffs] master b6935db 6/8: Merge from origin/emacs-26, Glenn Morris, 2018/12/02