unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 15120@debbugs.gnu.org
Subject: bug#15120: 24.3.50; (elisp) `Search-based Fontification': unspecified MATCHER cases
Date: Sun, 9 Feb 2014 16:02:56 -0800 (PST)	[thread overview]
Message-ID: <4d6326cc-875a-4581-8ed9-c084dffdda08@default> (raw)
In-Reply-To: <87a9e242im.fsf@building.gnus.org>

> > The doc string is good in this regard, but the Elisp manual is
> > not.
> >
> > The manual says that an element can be FUNCTION.  OK.
> >
> > And it says, for (MATCHER . SUBEXP), that MATCHER can be a
> > function.  OK.
> >
> > But it does not say that for all of the other (MATCHER . *)
> > patterns MATCHER can also be a function.  In fact, for the others
> > MATCHER is left unspecified.
> >
> > And for (MATCHER . SUBEXP-HIGHLIGHTER) the doc actually refers to
> > a "SUBEXP in MATCHER", which suggests, but does not specify, that
> > MATCHER in this case can be or perhaps even *must be* a REGEXP.
> >
> > Follow the example of the doc string, or state somewhere that
> > MATCHER, in all that follows, can be either a regexp or a function...
> >
> > IOW, make clear just what MATCHER can be, in general or in each of
> > the cases.
> 
> I see what you mean, 

No, I don't think you do.

> but if you read the page from the start to finish,

I certainly did that.  Did you?

> you see that it explains what all meta-syntactical are once.

Not at all.

> It says what MATCHER is the first time it talks about it, and then it
> just describes what each new element is.  So I think the page is OK as
> is.

You are just not reading.

What it says, at the place where you apparently think that it
introduces MATCHER for the entire page, is this:

  "In this kind of element, MATCHER is..."
   ^^^^^^^^^^^^^^^^^^^^^^^

IN THIS KIND OF ELEMENT!  Why on Earth does it say that?

It is specifying what MATCHER means in the form `(MATCHER . SUBEXP)',
where SUBEXP must be...  And by taking the pains to specify
explicitly that this applies to this kind of element, the
suggestion is that it does NOT necessarily apply to the other
kinds of element shown on the page.  Otherwise, why say that?

That's the point: each of these kinds of "element" is specified
separately, and it says so explicitly.  If you want to make the
current description of MATCHER apply to the whole page, then it
needs to be introduced at the outset as applying to the whole page.

And the text certainly should NOT then say that the description
applies to some particular kind of element.  IOW, remove that
"In this kind of element...", as well.

Again, please _read_ the bug report.  Among other things, it says
that the doc string gets it right.  Use it, if it helps, as your
inspiration for actually _fixing_ this bug.





  reply	other threads:[~2014-02-10  0:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-17 17:33 bug#15120: 24.3.50; (elisp) `Search-based Fontification': unspecified MATCHER cases Drew Adams
2014-02-08  5:06 ` Lars Ingebrigtsen
2014-02-10  0:02   ` Drew Adams [this message]
2014-02-10  8:03     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d6326cc-875a-4581-8ed9-c084dffdda08@default \
    --to=drew.adams@oracle.com \
    --cc=15120@debbugs.gnu.org \
    --cc=larsi@gnus.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).