From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Clarify `pcase' `rx' pattern doc Date: Thu, 21 Jun 2018 13:13:58 +0200 Message-ID: <87tvpw4cjt.fsf@web.de> References: <87fu1rqr6m.fsf@web.de> <87in6gff2t.fsf@web.de> <83wouwrq3d.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529579586 32719 195.159.176.226 (21 Jun 2018 11:13:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2018 11:13:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 21 13:13:01 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fVxWP-0008NJ-EY for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 13:13:01 +0200 Original-Received: from localhost ([::1]:54503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVxYW-0001rK-LQ for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 07:15:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVxXW-0001rD-8g for emacs-devel@gnu.org; Thu, 21 Jun 2018 07:14:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVxXV-0001m7-DZ for emacs-devel@gnu.org; Thu, 21 Jun 2018 07:14:10 -0400 Original-Received: from mout.web.de ([212.227.17.12]:55051) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVxXP-0001jY-HX; Thu, 21 Jun 2018 07:14:03 -0400 Original-Received: from drachen.dragon ([188.110.196.170]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MLxs8-1fZGuy2RFU-007kLv; Thu, 21 Jun 2018 13:14:00 +0200 In-Reply-To: <83wouwrq3d.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Jun 2018 19:56:06 +0300") X-Provags-ID: V03:K1:6fvcduXKJ9V0Aw+3COIPJ6N5lzvkp8+to3XRjTBMKnaD/GHn6U7 OX9o1YYWJFIJxVnUcP+GkLgzxTo6eJVg4tYI+x/k2SLRydmJbAYHcLI+ObADEZxMKklp4dY Zl+hFjf3HegvMOipEJKkPnfj67T5EvIje1BDNg/+C3LSWuewYNuZgG24Q+sT7UxC/qSsWSb Ebcl2tj+d564ZrQBhS6cg== X-UI-Out-Filterresults: notjunk:1;V01:K0:bt38wxy2/Kg=:SrXPjW9W5YjSLULPXcIgdf bvsSNbmRZyWJ10oM/2+1sTMQACyQ5uBVkysO2khkExxyXxs9S0xWK5EVkaTz2bVJmY92gZaEb dnSbgm8Gk8KKICb2AnbxiUIiH1RD3CVghCU5rJ+J5h2s0LuRKeD2Dw7jUt5XDn2X+OShlX+OH 8ju5aguM40PryNdRAZUWE3/cSvIi4yvuLRZLu0r7sdn018Cq3h/DZRVyajoC2dS7K3wqDa9Gy 0td/m/8PFJO7/rAKY7L2VNexW/rlXwtrG7a3X+1DBTkFwWlnisz8sYtBwMmakUDocGKNoBTdW BX0uRAvfFfBd4v2KD84KjagHmsomYAcgz/raPmUZYKNjzFhLDkNP1Gj/o6TCHIWwEMwXWxbqK vWoZGdJGMhLFc4wNjzWsEH/Zo3SwwOhtSFbwoGCX4n8L04zuCzZc1wxp+cy3lorUYSQ4k18Rp yVtBdB7cYh31ZtzXV/wOQyXbfnPFPcNQ6a12lyFpNbnr5BwYaQ4GSO7fu84JJTNbePejxggut 4MJmHh+lrG/4XLtf9NxyRyHWT1H2pvNaNFubpLkbYWfuzt9djogeA8xERHqLQUF517+pCrf0+ 1yrsnRkz8FrA6N+1AbIKvkoHbhnoGN/ivlzwnjtQHlBMOVcHPFmDXqadZdj8MZblbzc3ojWV/ UMlOzY64dQO6ToX1SYKBfv/dFoMcz81EEvKBLCeTDR8RuzK/INbBzB78cWrIADvZorCqauBWR DmQlAQjh+fbGzSvmaO0/G+PEcQ3gAn4OuGTGeYN6NSPvUvpZ3t6JS9GD1GGejgJ3UECNd9Ql X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:226563 Archived-At: Eli Zaretskii writes: > > (pcase-defmacro rx (&rest regexps) > > - "Build a `pcase' pattern matching `rx' regexps. > > -The REGEXPS are interpreted as by `rx'. The pattern matches if > > -the regular expression so constructed matches EXPVAL, as if > > -by `string-match'. > > + "Build a `pcase' pattern matching with `rx' REGEXPS. > > I don't like calling this "regexp". Elsewhere in rx documentation we > say either "regexps in sexp form" or just "form". Using "regexp" > might confuse the reader to think these are the "normal" regexp > strings. But hey, ehm - I didn't change this, I just upcased the argument name. > > - (let VAR FORM...) creates a new explicitly numbered submatch > > - that matches FORM and binds the match to > > - VAR. > > - (backref VAR) creates a backreference to the submatch > > - introduced by a previous (let VAR ...) > > - construct. > > + (let VAR REGEXPS...) creates a new explicitly numbered > > + submatch that matches the `rx' REGEXPS > > + and binds the match to VAR. > > IMO, this change is for the worse: the original clearly indicated that > FORM is the rx-style regexp, whereas the new text blurs this > indication. And here I just used the same name for the `let' argument, since it's of exactly the same type as the argument of the `rx' pattern. Even the normal `rx' macro (not the pcase macro) names its &rest argument "REGEXPS" - so I think now what I suggested was just consistent. Of cause could we change all occurrences of "REGEXPS" to "FORMS" or something better, but I think this is not in the scope of my suggested commit. Michael.