summaryrefslogtreecommitdiff
path: root/doc/lispref/sequences.texi
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-11-04 09:37:03 -0800
committerGlenn Morris <rgm@gnu.org>2018-11-04 09:37:03 -0800
commit410e65e4ce6f871fd1b8a2ef4b227cbeeb17c1dd (patch)
tree7b7272b5ddfc5b51992b590e1ec63136a3f20381 /doc/lispref/sequences.texi
parent4fbdccedd58ffe4cd5f7ed7b744123cc25084bc4 (diff)
parent6937c35d3260fe3fc32249313c7e9b6231cbd3dd (diff)
downloademacs-410e65e4ce6f871fd1b8a2ef4b227cbeeb17c1dd.tar.gz
Merge from origin/emacs-26
6937c35 (origin/emacs-26) Improve recent changes in documentation of ... c04b48c Rewrite documentation of buffer display 7cadb32 ; * doc/lispref/control.texi (pcase Macro): Fix another typo. 963f1d9 ; * doc/lispref/control.texi (pcase Macro): Fix a typo. e824c91 Improve documentation of destructuring-binding macros
Diffstat (limited to 'doc/lispref/sequences.texi')
-rw-r--r--doc/lispref/sequences.texi20
1 files changed, 13 insertions, 7 deletions
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 6a6f4d5c82e..554716084ee 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -1049,15 +1049,18 @@ that @var{sequence} can be a list, vector or string. This is
primarily useful for side-effects.
@end defmac
-@defmac seq-let arguments sequence body@dots{}
+@anchor{seq-let}
+@defmac seq-let var-sequence val-sequence body@dots{}
@cindex sequence destructuring
- This macro binds the variables defined in @var{arguments} to the
-elements of @var{sequence}. @var{arguments} can themselves include
-sequences, allowing for nested destructuring.
+ This macro binds the variables defined in @var{var-sequence} to the
+values that are the corresponding elements of @var{val-sequence}.
+This is known as @dfn{destructuring binding}. The elements of
+@var{var-sequence} can themselves include sequences, allowing for
+nested destructuring.
-The @var{arguments} sequence can also include the @code{&rest} marker
-followed by a variable name to be bound to the rest of
-@code{sequence}.
+The @var{var-sequence} sequence can also include the @code{&rest}
+marker followed by a variable name to be bound to the rest of
+@var{val-sequence}.
@example
@group
@@ -1081,6 +1084,9 @@ followed by a variable name to be bound to the rest of
@end group
@result{} [3 4]
@end example
+
+The @code{pcase} patterns provide an alternative facility for
+destructuring binding, see @ref{Destructuring with pcase Patterns}.
@end defmac
@defun seq-random-elt sequence