[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock-keywords: matcher function not working
From: |
rfflrccrd |
Subject: |
Re: font-lock-keywords: matcher function not working |
Date: |
Fri, 28 Jun 2013 03:43:05 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Thursday, June 27, 2013 7:32:57 PM UTC+2, Stefan Monnier wrote:
> Your rr-match-indented-paren should *search* rather than only check the
>
> current position.
Thank you for your attention, Stefan.
However, doesn't my matcher function search already? It checks the
current position first to return NIL for a failed match. OTOH, when
the check succeeds, the matcher function calls `re-search-forward' to
set `match-data' appropriately. IMO, this is the expected behaviour
according to the documentation of `font-lock-keywords':
"MATCHER [...] should return non-nil, move point, and set `match-data'
appropriately if it succeeds; like `re-search-forward' would."
Otherwise - that is: when the match fails - MATCHER should do nothing
and return NIL, shouldn't it?
> While I'm here, I recommend you (setq font-lock-support-mode nil) then
>
> disable&enable font-lock so that jit-lock won't be used: this makes it
>
> much easier to debug the code, especially when it signals errors (or
>
> course, you also want to set debug-on-error to t).
Thank you for these tips.
- font-lock-keywords: matcher function not working, Raffaele Ricciardi, 2013/06/27
- Re: font-lock-keywords: matcher function not working, Raffaele Ricciardi, 2013/06/27
- Re: font-lock-keywords: matcher function not working, Stefan Monnier, 2013/06/27
- Message not available
- Re: font-lock-keywords: matcher function not working,
rfflrccrd <=
- Re: font-lock-keywords: matcher function not working, Stefan Monnier, 2013/06/28
- Message not available
- Re: font-lock-keywords: matcher function not working, Raffaele Ricciardi, 2013/06/28
- Re: font-lock-keywords: matcher function not working, Stefan Monnier, 2013/06/28
- Message not available
- Re: font-lock-keywords: matcher function not working, Raffaele Ricciardi, 2013/06/29
- Re: font-lock-keywords: matcher function not working, Raffaele Ricciardi, 2013/06/29