lua-users home
lua-l archive

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


* Miles Bader:

> On Mon, Feb 7, 2011 at 5:49 AM, Florian Weimer <fw@deneb.enyo.de> wrote:
>>> They can be _much_ less efficient than text properties when used in
>>> large numbers... (so it's not recommended to use them for typical
>>> syntax-highlighting type uses)
>>
>> They are not very efficient, true.  I should have written down why I
>> preferred them over text properties, but I think it had to do with the
>> fact that changing overlays does not count as a buffer modification,
>> but changing text properties does.
>
> What typical modes do is simply inhibit the recording of buffer
> modification during fontification -- of course most modes use
> font-lock, which does this automatically.  [Using font-lock is
> probably a good idea generally.]

I'm not sure how I could integrate the semantic information with
font-lock.  After all, I need to start analysis at least at the point
of the last buffer modification.

> Anyway, I'll write my own mode to include in Emacs if I have too, but
> I'd much prefer not to....

lua2-mode's lexer should use syntax-tables for performance reasons, so
there's another reason to rewrite it...