emacs-diffs
[Top][All Lists]
Advanced

[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}



reply via email to

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