diff options
| author | Eli Zaretskii | 2023-11-16 21:55:10 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-11-16 21:55:10 +0200 |
| commit | c20ae7a30fb012402be41b6fbfb45318005a09d7 (patch) | |
| tree | 6a1606e2a80aa29ee63f39e243c8417deb677dd3 | |
| parent | 42181b65df165d3cbf472f7c9aa1f1b14ecf9a52 (diff) | |
| download | emacs-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.texi | 7 |
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{_} | |||
| 597 | Likewise, it makes no sense to bind keyword symbols | 597 | Likewise, it makes no sense to bind keyword symbols |
| 598 | (@pxref{Constant Variables}). | 598 | (@pxref{Constant Variables}). |
| 599 | 599 | ||
| 600 | @item `@var{qpat} | ||
| 601 | A backquote-style pattern. @xref{Backquote Patterns}, for the | ||
| 602 | details. | ||
| 603 | |||
| 600 | @item (cl-type @var{type}) | 604 | @item (cl-type @var{type}) |
| 601 | Matches if @var{expval} is of type @var{type}, which is a type | 605 | Matches if @var{expval} is of type @var{type}, which is a type |
| 602 | descriptor as accepted by @code{cl-typep} (@pxref{Type Predicates,,,cl,Common | 606 | descriptor 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} |
| 1236 | is a three-element list starting with the literal symbol @code{add}, | 1240 | is a three-element list starting with the literal symbol @code{add}, |
| 1237 | then extracts the second and third elements and binds them | 1241 | then extracts the second and third elements and binds them |
| 1238 | to symbols @code{x} and @code{y}, respectively. | 1242 | to symbols @code{x} and @code{y}, respectively. This is known as |
| 1243 | @dfn{destructuring}, see @ref{Destructuring with pcase Patterns}. | ||
| 1239 | The clause body evaluates @code{x} and @code{y} and adds the results. | 1244 | The clause body evaluates @code{x} and @code{y} and adds the results. |
| 1240 | Similarly, the @code{call} clause implements a function call, | 1245 | Similarly, the @code{call} clause implements a function call, |
| 1241 | and the @code{fn} clause implements an anonymous function definition. | 1246 | and the @code{fn} clause implements an anonymous function definition. |