From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Clarify `pcase' `rx' pattern doc
Date: Thu, 21 Jun 2018 13:13:58 +0200 [thread overview]
Message-ID: <87tvpw4cjt.fsf@web.de> (raw)
In-Reply-To: <83wouwrq3d.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Jun 2018 19:56:06 +0300")
Eli Zaretskii <eliz@gnu.org> 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.
next prev parent reply other threads:[~2018-06-21 11:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 3:52 Clarify `pcase' `rx' pattern doc Michael Heerdegen
2018-06-13 5:43 ` Michael Heerdegen
2018-06-13 7:33 ` Andreas Schwab
2018-06-13 7:59 ` Michael Heerdegen
2018-06-13 8:18 ` Michael Heerdegen
2018-06-13 12:29 ` Yuri Khan
2018-06-18 12:34 ` Michael Heerdegen
2018-06-18 14:11 ` Stefan Monnier
2018-06-18 14:58 ` Michael Heerdegen
2018-06-18 16:56 ` Eli Zaretskii
2018-06-18 17:22 ` Michael Heerdegen
2018-06-18 17:55 ` Eli Zaretskii
2018-06-21 11:13 ` Michael Heerdegen [this message]
2018-06-21 14:48 ` Eli Zaretskii
2018-06-21 15:13 ` Michael Heerdegen
2018-06-23 13:35 ` Eli Zaretskii
2018-07-06 17:57 ` Michael Heerdegen
2018-07-07 6:53 ` Eli Zaretskii
2018-07-07 13:36 ` Michael Heerdegen
2018-07-07 13:57 ` Eli Zaretskii
2018-07-07 14:35 ` Michael Heerdegen
2018-07-20 8:45 ` Eli Zaretskii
2018-07-20 22:56 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tvpw4cjt.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.