aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-11-16 21:55:10 +0200
committerEli Zaretskii2023-11-16 21:55:10 +0200
commitc20ae7a30fb012402be41b6fbfb45318005a09d7 (patch)
tree6a1606e2a80aa29ee63f39e243c8417deb677dd3
parent42181b65df165d3cbf472f7c9aa1f1b14ecf9a52 (diff)
downloademacs-c20ae7a30fb012402be41b6fbfb45318005a09d7.tar.gz
emacs-c20ae7a30fb012402be41b6fbfb45318005a09d7.zip
; Improve cross-references in description of 'pcase'
* doc/lispref/control.texi (pcase Macro, Backquote Patterns): Improve cross-references.
-rw-r--r--doc/lispref/control.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 84196c9116a..90b1358b3cd 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -597,6 +597,10 @@ Two symbols to avoid are @code{t}, which behaves like @code{_}
597Likewise, it makes no sense to bind keyword symbols 597Likewise, it makes no sense to bind keyword symbols
598(@pxref{Constant Variables}). 598(@pxref{Constant Variables}).
599 599
600@item `@var{qpat}
601A backquote-style pattern. @xref{Backquote Patterns}, for the
602details.
603
600@item (cl-type @var{type}) 604@item (cl-type @var{type})
601Matches if @var{expval} is of type @var{type}, which is a type 605Matches if @var{expval} is of type @var{type}, which is a type
602descriptor as accepted by @code{cl-typep} (@pxref{Type Predicates,,,cl,Common 606descriptor as accepted by @code{cl-typep} (@pxref{Type Predicates,,,cl,Common
@@ -1235,7 +1239,8 @@ The first three clauses use backquote-style patterns.
1235@code{`(add ,x ,y)} is a pattern that checks that @code{form} 1239@code{`(add ,x ,y)} is a pattern that checks that @code{form}
1236is a three-element list starting with the literal symbol @code{add}, 1240is a three-element list starting with the literal symbol @code{add},
1237then extracts the second and third elements and binds them 1241then extracts the second and third elements and binds them
1238to symbols @code{x} and @code{y}, respectively. 1242to symbols @code{x} and @code{y}, respectively. This is known as
1243@dfn{destructuring}, see @ref{Destructuring with pcase Patterns}.
1239The clause body evaluates @code{x} and @code{y} and adds the results. 1244The clause body evaluates @code{x} and @code{y} and adds the results.
1240Similarly, the @code{call} clause implements a function call, 1245Similarly, the @code{call} clause implements a function call,
1241and the @code{fn} clause implements an anonymous function definition. 1246and the @code{fn} clause implements an anonymous function definition.