diff options
author | Thien-Thi Nguyen <ttn@gnu.org> | 2018-05-21 18:01:31 +0200 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnu.org> | 2018-05-21 18:01:31 +0200 |
commit | 10f869f2966af5e26033202e6f757dbba41f1ad3 (patch) | |
tree | 35da6390a558719775f75e6adc5cc7caf4ad52f8 | |
parent | 567342a88e5349e701e448a90bc24611bf321caa (diff) | |
download | emacs-fix/bug-31311-pcase-doc.tar.gz |
touch up ‘Pattern-Matching Conditional’ intro parafix/bug-31311-pcase-doc
- zonk Issue -- we can worry about ‘s/case/cl-case/g’ later
- move xref ‘(cl) Conditionals’ to follow first ‘case’ mention
- mention "introduces programming style"
- mention "pattern matching" as @dfn
- explicitly segue into limitations
-rw-r--r-- | doc/lispref/control.texi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index b0cd777bead..33051a6de51 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -419,13 +419,13 @@ This is not completely equivalent because it can evaluate @var{arg1} or @cindex pcase @cindex pattern matching -@c Issue: I use ‘case’ w/ the thought that it being an alias -@c to ‘cl-case’ is an ``implementation detail''. -@c Is this okay? Aside from the four basic conditional forms, Emacs Lisp also has a pattern-matching conditional form, the @code{pcase} macro, a hybrid of @code{cond} and @code{case} -that overcomes their limitations. +(@pxref{Conditionals,,,cl,Common Lisp Extensions}) +that overcomes their limitations and introduces +the @dfn{pattern matching} programming style. +First, the limitations: @itemize @item The @code{cond} form chooses among alternatives @@ -442,7 +442,7 @@ For that, why not use @code{case}? @item The @code{case} macro chooses among alternatives by evaluating the equality of its first argument against a set of specific -values (@pxref{Conditionals,,,cl,Common Lisp Extensions}). +values. The limitations are two-fold: @enumerate |