emacs-devel
[Top][All Lists]
Advanced

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

Re: `font-lock-extend-region-functions' vs. `font-lock-extend-after-chan


From: Stefan Monnier
Subject: Re: `font-lock-extend-region-functions' vs. `font-lock-extend-after-change-region-function'
Date: Mon, 04 May 2009 15:08:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

> Alternatively `font-lock-default-fontify-region' could be made smarter
> in so far as it could check whether a pass actually changed
> font-lock-beg and font-lock-end, and if not, would not try
> another pass.

If a function doesn't actually change font-lock-{beg/end}, it should
return nil.

And yes, the risk of inf-loop is a problem, but I don't know how to
solve it, because counters aren't really a solution either.
Maybe I could simply impose an arbitrary limit so we can't go through
the loop more than 10 times (or N times, N being the length of
font-lock-default-fontify-region).


        Stefan




reply via email to

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