From: Raffaele Ricciardi <rfflrccrd@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: font-lock-keywords: matcher function not working
Date: Fri, 28 Jun 2013 22:50:17 +0200 [thread overview]
Message-ID: <b36b8aF3sfrU1@mid.individual.net> (raw)
In-Reply-To: <mailman.2731.1372447819.22516.help-gnu-emacs@gnu.org>
On 28/06/13 21:30, Stefan Monnier wrote:
> That's not a search. It just says "doesn't match here" without saying
> anything about the rest of the text until ^end, whereas a nil return
> value is supposed to mean "nothing found between here and ^end" (just
> as a nil return value of `re-search-forward').
Thank you again, Stefan. However, I still don't understand. The check
is there because Emacs' regular expressions lack a "look behind"
construct, and the matcher has to check for leading whitespace. How
is it supposed to look? I chose to look for leading whitespace
separately, and to choose afterwards whether to return NIL immediately
or to return the result of `re-search-forward' - which at that point
is guaranteed to succeed - but such call is a shortcut to ensure that
the matcher returns information consistent to the requirements of the
font locking engine. Am I missing something?
next prev parent reply other threads:[~2013-06-28 20:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 12:39 font-lock-keywords: matcher function not working Raffaele Ricciardi
2013-06-27 12:40 ` Raffaele Ricciardi
2013-06-27 17:32 ` Stefan Monnier
[not found] ` <mailman.2602.1372354403.22516.help-gnu-emacs@gnu.org>
2013-06-28 10:43 ` rfflrccrd
2013-06-28 19:30 ` Stefan Monnier
[not found] ` <mailman.2731.1372447819.22516.help-gnu-emacs@gnu.org>
2013-06-28 20:50 ` Raffaele Ricciardi [this message]
2013-06-29 2:35 ` Stefan Monnier
[not found] ` <mailman.2762.1372473348.22516.help-gnu-emacs@gnu.org>
2013-06-29 8:53 ` Raffaele Ricciardi
2013-06-29 13:32 ` Raffaele Ricciardi
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=b36b8aF3sfrU1@mid.individual.net \
--to=rfflrccrd@gmail.com \
--cc=help-gnu-emacs@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.
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).