summaryrefslogtreecommitdiff
path: root/doc/lispref
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-08-22 17:57:35 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-08-22 17:57:39 +0200
commit4102fe1e91e46fb2fde9ac2f8d279a942d0a6e6f (patch)
tree060d18dae9816421f06b0c13509147f8df61c629 /doc/lispref
parent29bb72f0432c7b89d2f7dec5022c582f8e10ada9 (diff)
downloademacs-4102fe1e91e46fb2fde9ac2f8d279a942d0a6e6f.tar.gz
Clarify inline-letevals in the manual
* doc/lispref/functions.texi (Inline Functions): Try to clarify what inline-letevals really does, and how it differs from `let' (bug#31052).
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/functions.texi27
1 files changed, 18 insertions, 9 deletions
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 2898cb4d2b4..26b212d05eb 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -2163,15 +2163,24 @@ the backquote (@pxref{Backquote}), but quotes code and accepts only
@end defmac
@defmac inline-letevals (bindings@dots{}) body@dots{}
-This is similar to @code{let} (@pxref{Local Variables}): it sets up
-local variables as specified by @var{bindings}, and then evaluates
-@var{body} with those bindings in effect. Each element of
-@var{bindings} should be either a symbol or a list of the form
-@w{@code{(@var{var} @var{expr})}}; the result is to evaluate
-@var{expr} and bind @var{var} to the result. The tail of
-@var{bindings} can be either @code{nil} or a symbol which should hold
-a list of arguments, in which case each argument is evaluated, and the
-symbol is bound to the resulting list.
+This provides a convenient way to ensure that the arguments to an
+inlined function are evaluated exactly once, as well as to create
+local variables.
+
+It's similar to @code{let} (@pxref{Local Variables}): It sets up local
+variables as specified by @var{bindings}, and then evaluates
+@var{body} with those bindings in effect.
+
+Each element of @var{bindings} should be either a symbol or a list of
+the form @w{@code{(@var{var} @var{expr})}}; the result is to evaluate
+@var{expr} and bind @var{var} to the result. However, when an element
+of @var{bindings} is just a symbol @var{var}, the result of evaluating
+@var{var} is re-bound to @var{var} (which is quite different from the
+way @code{let} works).
+
+The tail of @var{bindings} can be either @code{nil} or a symbol which
+should hold a list of arguments, in which case each argument is
+evaluated, and the symbol is bound to the resulting list.
@end defmac
@defmac inline-const-p expression