From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: Update of pcase docs for the elisp manual Date: Fri, 29 Jan 2016 13:39:59 +0000 Message-ID: References: <87d1stznc6.fsf@web.de> <83io2k5yvg.fsf@gnu.org> <838u3c18w3.fsf@gnu.org> <83y4bcytk6.fsf@gnu.org> <83zivoyeh9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1454074852 19093 80.91.229.3 (29 Jan 2016 13:40:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jan 2016 13:40:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 29 14:40:44 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aP9Hz-0004nX-3C for ged-emacs-devel@m.gmane.org; Fri, 29 Jan 2016 14:40:39 +0100 Original-Received: from localhost ([::1]:34177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP9Hy-00060P-8O for ged-emacs-devel@m.gmane.org; Fri, 29 Jan 2016 08:40:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP9Hj-00060I-MD for emacs-devel@gnu.org; Fri, 29 Jan 2016 08:40:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aP9Hg-0006Oh-FY for emacs-devel@gnu.org; Fri, 29 Jan 2016 08:40:23 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:48492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP9Hf-0006OS-F0 for emacs-devel@gnu.org; Fri, 29 Jan 2016 08:40:20 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aP9HX-0004KF-4U for emacs-devel@gnu.org; Fri, 29 Jan 2016 14:40:11 +0100 Original-Received: from uk.solarflare.com ([193.34.186.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Jan 2016 14:40:11 +0100 Original-Received: from andrewjmoreton by uk.solarflare.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Jan 2016 14:40:11 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: uk.solarflare.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:+J8o3Po39SSAlKPt5c/GPQWgD2o= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198989 Archived-At: On Fri 29 Jan 2016, Eli Zaretskii wrote: > > I will make a few final corrections soon, based on these discussions, > and then I'm done with that part of the manual. Thanks for your efforts to improve the documentation. In (info "(elisp) Pattern matching case statement") we currently have: "The ‘cond’ form lets you choose between alternatives using predicate conditions that compare values of expressions against specific values known and written in advance. However, sometimes it is useful to select alternatives based on more general conditions that distinguish between broad classes of values. The ‘pcase’ macro allows you to choose between alternatives based on matching the value of an expression against a series of patterns. A pattern can be a literal value (for comparisons to literal values you’d use ‘cond’), or it can be a more general description of the expected structure of the expression’s value." I think this would be clearer without the initial discussion of cond: "The ‘pcase’ macro allows you to choose between alternatives based on matching the value of an expression against a series of patterns. A pattern can be a literal value (for comparisons to literal values you’d use ‘cond’), or it can be a more general description of the expected structure of the expression’s value." This gets straight to saying what pcase is useful for (and when cond is sufficient for the task). Also, the description of CLAUSES for pcase and cond in the manual use: pcase: (PATTERN BODY-FORMS…) cond: (CONDITION BODY-FORMS…) However the doc strings are inconsistent with the manual: pcase: (PATTERN CODE...) cond: (CONDITION BODY...) It would be better to use consistent terms. AndyM