help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font-lock-keywords: matcher function not working


From: Raffaele Ricciardi
Subject: Re: font-lock-keywords: matcher function not working
Date: Fri, 28 Jun 2013 22:50:17 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]