emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 c20ae7a30fb: ; Improve cross-references in description of 'pcas


From: Eli Zaretskii
Subject: emacs-29 c20ae7a30fb: ; Improve cross-references in description of 'pcase'
Date: Thu, 16 Nov 2023 14:56:04 -0500 (EST)

branch: emacs-29
commit c20ae7a30fb012402be41b6fbfb45318005a09d7
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Improve cross-references in description of 'pcase'
    
    * doc/lispref/control.texi (pcase Macro, Backquote Patterns):
    Improve cross-references.
---
 doc/lispref/control.texi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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{_}
 Likewise, it makes no sense to bind keyword symbols
 (@pxref{Constant Variables}).
 
+@item `@var{qpat}
+A backquote-style pattern.  @xref{Backquote Patterns}, for the
+details.
+
 @item (cl-type @var{type})
 Matches if @var{expval} is of type @var{type}, which is a type
 descriptor as accepted by @code{cl-typep} (@pxref{Type Predicates,,,cl,Common
@@ -1235,7 +1239,8 @@ The first three clauses use backquote-style patterns.
 @code{`(add ,x ,y)} is a pattern that checks that @code{form}
 is a three-element list starting with the literal symbol @code{add},
 then extracts the second and third elements and binds them
-to symbols @code{x} and @code{y}, respectively.
+to symbols @code{x} and @code{y}, respectively.  This is known as
+@dfn{destructuring}, see @ref{Destructuring with pcase Patterns}.
 The clause body evaluates @code{x} and @code{y} and adds the results.
 Similarly, the @code{call} clause implements a function call,
 and the @code{fn} clause implements an anonymous function definition.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]