aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSean Whitton2025-10-07 17:31:34 +0100
committerSean Whitton2025-10-07 17:35:06 +0100
commitda47fa2f23bde6cc96f90f56ccf383128affb748 (patch)
treea93364fe60ebd2bae74ead9f0a6aab0ef77b23ce /doc
parentdb7fd704deee3cbb7d7af72126c992cbc55383f9 (diff)
downloademacs-da47fa2f23bde6cc96f90f56ccf383128affb748.tar.gz
emacs-da47fa2f23bde6cc96f90f56ccf383128affb748.zip
if-let*/when-let*/and-let*: Don't recommend (VALUEFORM) form
* doc/lispref/control.texi (Conditionals): * lisp/subr.el (if-let*): Document '(_ VALUEFORM)' instead of '(VALUEFORM)'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/control.texi21
1 files changed, 10 insertions, 11 deletions
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 689e7324d43..8f1f144e765 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -317,7 +317,7 @@ following way instead:
317 (do-something result2)) 317 (do-something result2))
318@end example 318@end example
319 319
320There's a number of variations on this theme, and they're briefly 320There are a number of variations on this theme, and they're briefly
321described below. 321described below.
322 322
323@defmac if-let* varlist then-form else-forms... 323@defmac if-let* varlist then-form else-forms...
@@ -328,10 +328,9 @@ Evaluate each binding in @var{varlist}, stopping if a binding value is
328Each element of @code{varlist} has the form @w{@code{(@var{symbol} 328Each element of @code{varlist} has the form @w{@code{(@var{symbol}
329@var{value-form})}}: @var{value-form} is evaluated and @var{symbol} is 329@var{value-form})}}: @var{value-form} is evaluated and @var{symbol} is
330locally bound to the result. Bindings are sequential, as in @code{let*} 330locally bound to the result. Bindings are sequential, as in @code{let*}
331(@pxref{Local Variables}). As a special case, @var{symbol} can be 331(@pxref{Local Variables}). If only the test result of @var{value-form}
332omitted if only the test result of @var{value-form} is of interest: 332is of interest, use @code{_} for @var{symbol}. Then @var{value-form} is
333@var{value-form} is evaluated and checked for @code{nil}, but its value 333evaluated and checked for @code{nil}, but its value is not bound.
334is not bound.
335@end defmac 334@end defmac
336 335
337@defmac when-let* varlist then-forms... 336@defmac when-let* varlist then-forms...
@@ -343,8 +342,8 @@ form in @var{then-forms}.
343@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}}, 342@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}},
344in which @var{value-form} is evaluated and @var{symbol} is locally bound 343in which @var{value-form} is evaluated and @var{symbol} is locally bound
345to the result. Bindings are sequential, as in @code{let*} (@pxref{Local 344to the result. Bindings are sequential, as in @code{let*} (@pxref{Local
346Variables}). As a special case, @var{symbol} can be omitted if only the 345Variables}). If only the test result of @var{value-form}
347test result of @var{value-form} is of interest: @var{value-form} is 346is of interest, use @code{_} for @var{symbol}. Then @var{value-form} is
348evaluated and checked for @code{nil}, but its value is not bound. 347evaluated and checked for @code{nil}, but its value is not bound.
349@end defmac 348@end defmac
350 349
@@ -358,8 +357,8 @@ the value of the last binding.
358@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}}, 357@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}},
359in which @var{value-form} is evaluated and @var{symbol} is locally bound 358in which @var{value-form} is evaluated and @var{symbol} is locally bound
360to the result. Bindings are sequential, as in @code{let*} (@pxref{Local 359to the result. Bindings are sequential, as in @code{let*} (@pxref{Local
361Variables}). As a special case, @var{symbol} can be omitted if only the 360Variables}). If only the test result of @var{value-form} is of
362test result of @var{value-form} is of interest: @var{value-form} is 361interest, use @code{_} for @var{symbol}. Then @var{value-form} is
363evaluated and checked for @code{nil}, but its value is not bound. 362evaluated and checked for @code{nil}, but its value is not bound.
364@end defmac 363@end defmac
365 364
@@ -382,8 +381,8 @@ established anew.
382@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}}, 381@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}},
383in which @var{value-form} is evaluated and @var{symbol} is locally bound 382in which @var{value-form} is evaluated and @var{symbol} is locally bound
384to the result. Bindings are sequential, as in @code{let*} (@pxref{Local 383to the result. Bindings are sequential, as in @code{let*} (@pxref{Local
385Variables}). As a special case, @var{symbol} can be omitted if only the 384Variables}). If only the test result of @var{value-form} is of
386test result of @var{value-form} is of interest: @var{value-form} is 385interest, use @code{_} for @var{symbol}. Then @var{value-form} is
387evaluated and checked for @code{nil}, but its value is not bound. 386evaluated and checked for @code{nil}, but its value is not bound.
388 387
389The return value of @code{while-let} is always @code{nil}. 388The return value of @code{while-let} is always @code{nil}.