From 10f869f2966af5e26033202e6f757dbba41f1ad3 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Mon, 21 May 2018 18:01:31 +0200 Subject: =?UTF-8?q?touch=20up=20=E2=80=98Pattern-Matching=20Conditional?= =?UTF-8?q?=E2=80=99=20intro=20para?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- doc/lispref/control.texi | 10 +++++----- 1 file 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 -- cgit v1.2.1