[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] fix/bug-31311-pcase-doc 684d82c 4/9: rewrite ‘defmac pcas
From: |
Thien-Thi Nguyen |
Subject: |
[Emacs-diffs] fix/bug-31311-pcase-doc 684d82c 4/9: rewrite ‘defmac pcase-defmacro’ first para |
Date: |
Sun, 20 May 2018 14:39:28 -0400 (EDT) |
branch: fix/bug-31311-pcase-doc
commit 684d82c6e0955ae2526fcda6b7d55b76d99cdd9c
Author: Thien-Thi Nguyen <address@hidden>
Commit: Thien-Thi Nguyen <address@hidden>
rewrite ‘defmac pcase-defmacro’ first para
- drop pre-block grousing comment
- elide "will be invoked"
- use "‘pcase’ expands" and "function call"
- use "whose job it is" (iffy)
---
doc/lispref/control.texi | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 4ae9ad0..6444338 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -855,13 +855,12 @@ This subsection describes @code{pcase-defmacro} and
that eases structural matching. (These patterns were
defined with @code{pcase-defmacro}.)
address@hidden Hmm, shouldn't this be named ‘pcase-defpattern’?
address@hidden I suppose it's too late now.... --ttn
@defmac pcase-defmacro name args [doc] &rest body
-Define a new kind of pattern for @code{pcase}. The new pattern will
-be invoked as @code{(@var{name} @var{actual-args})}. The @var{body}
-should describe how to rewrite the pattern @var{name} into some other
-pattern. The rewriting will be the result of evaluating @var{body}
+Define a new kind of pattern for @code{pcase}, to be invoked
+as @address@hidden(@var{name} @var{actual-args})}}.
+The @code{pcase} macro expands this into a function call
+that evaluates @var{body}, whose job it is to
+rewrite the invoked pattern into some other pattern,
in an environment where @var{args} are bound to @var{actual-args}.
Additionally, arrange to display @var{doc} along with
- [Emacs-diffs] fix/bug-31311-pcase-doc updated (b870f3f -> 7c68d9f), Thien-Thi Nguyen, 2018/05/20
- [Emacs-diffs] fix/bug-31311-pcase-doc f7570e3 1/9: add some @group, Thien-Thi Nguyen, 2018/05/20
- [Emacs-diffs] fix/bug-31311-pcase-doc ef4a105 2/9: rewrite "The rest of this subsection..." para, Thien-Thi Nguyen, 2018/05/20
- [Emacs-diffs] fix/bug-31311-pcase-doc 684d82c 4/9: rewrite ‘defmac pcase-defmacro’ first para,
Thien-Thi Nguyen <=
- [Emacs-diffs] fix/bug-31311-pcase-doc 3562c19 3/9: expand EXPVAL-in-docstring para, Thien-Thi Nguyen, 2018/05/20
- [Emacs-diffs] fix/bug-31311-pcase-doc 4d4df12 5/9: expand text post ‘defmac pcase-defmacro’, Thien-Thi Nguyen, 2018/05/20
- [Emacs-diffs] fix/bug-31311-pcase-doc dd271a2 8/9: zonk "QPAT expressable as core patterns" para, Thien-Thi Nguyen, 2018/05/20
- [Emacs-diffs] fix/bug-31311-pcase-doc 455f990 6/9: start on Backquote-Style Patterns, Thien-Thi Nguyen, 2018/05/20
- [Emacs-diffs] fix/bug-31311-pcase-doc 53973de 7/9: refine QPAT table, Thien-Thi Nguyen, 2018/05/20
- [Emacs-diffs] fix/bug-31311-pcase-doc 7c68d9f 9/9: explain lexical binding requirement for ‘evaluate’ example, Thien-Thi Nguyen, 2018/05/20