[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] fix/bug-31311-pcase-doc 4ede733 16/18: refine example head
From: |
Thien-Thi Nguyen |
Subject: |
[Emacs-diffs] fix/bug-31311-pcase-doc 4ede733 16/18: refine example header, grouping |
Date: |
Tue, 15 May 2018 05:45:55 -0400 (EDT) |
branch: fix/bug-31311-pcase-doc
commit 4ede733a169e54d311711fb20e21c83ab4b35a9c
Author: Thien-Thi Nguyen <address@hidden>
Commit: Thien-Thi Nguyen <address@hidden>
refine example header, grouping
- use @subheading instead @heading (since this is a @subsection)
- drop number from title (i.e., "Example:" and not "Example 1:")
- in ex.2, move first @group before ‘defun’
---
doc/lispref/control.texi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 4787310..3439916 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -420,7 +420,7 @@ Matches if all the argument U-patterns match.
@end table
@anchor{pcase-example-1}
address@hidden Example 1: Using @code{and}
address@hidden Example: Using @code{and}
A common idiom is to write a pattern starting with @code{and},
with one or more @var{symbol} sub-patterns providing bindings
@@ -445,7 +445,7 @@ evaluates to address@hidden
If all these sub-patterns match, @code{and} matches.
@anchor{pcase-example-2}
address@hidden Example 2: Reformulation with @code{pcase}
address@hidden Example: Reformulation with @code{pcase}
Here is another example that shows how to reformulate a simple
matching task from its traditional implementation
@@ -477,9 +477,9 @@ The reformulation demonstrates @var{symbol} binding
as well as some of the other pattern types.
@example
address@hidden
(defun grok/pcase (obj)
(pcase obj
address@hidden
((or ; @r{line 1}
(and ; @r{line 2}
(pred stringp) ; @r{line 3}
- [Emacs-diffs] fix/bug-31311-pcase-doc abf7e6a 03/18: zonk "side-effecting" Issue comment lines, (continued)
- [Emacs-diffs] fix/bug-31311-pcase-doc abf7e6a 03/18: zonk "side-effecting" Issue comment lines, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc c0f0f18 07/18: zonk later address@hidden introduction (superseded), Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 0f1c170 06/18: settle on address@hidden pcase’ text, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc dc4b413 09/18: do ‘s/predfun/function/g’, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 5e2eeee 17/18: transform ‘get-return-code’ example, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc e276ce7 13/18: transform ‘guard’ example, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc ff41db6 12/18: (docstring) quote ‘pcase’ in QPAT docstring, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc bd79b06 15/18: add anchor/heading to examples; fix typo, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc d5dfe0e 02/18: expand on SYMBOL, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 0dffb69 10/18: (docstring) do s/predicate function/predicate/g, s/specified/formed/g, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 4ede733 16/18: refine example header, grouping,
Thien-Thi Nguyen <=
- [Emacs-diffs] fix/bug-31311-pcase-doc 484c3ae 18/18: add xref to ‘(cl) Conditionals’, Thien-Thi Nguyen, 2018/05/15
- [Emacs-diffs] fix/bug-31311-pcase-doc 279d548 14/18: transform ‘let’ example, Thien-Thi Nguyen, 2018/05/15