emacs-devel
[Top][All Lists]
Advanced

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

Re: cc-mode fontification feels random


From: Eli Zaretskii
Subject: Re: cc-mode fontification feels random
Date: Sat, 12 Jun 2021 18:06:44 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: spacibba@aol.com,  ofv@wanadoo.es,  emacs-devel@gnu.org
> Date: Sat, 12 Jun 2021 10:33:59 -0400
> 
> The code is in `tree-sitter-hl.el`, where they define
> `tree-sitter-hl-mode` which is enabled by `tree-sitter-hl--setup`
> where they
> 
>     (add-function :override (local 'font-lock-fontify-region-function)
>                   #'tree-sitter-hl--highlight-region)

I've seen that, but it's full of FIXMEs that basically tell me this is
incomplete and perhaps even kludgey?

I don't really understand why the workarounds are needed (nor why
font-lock-keywords would need to still be supported with TS).

And I cannot say I'm happy with the uses of buffer-substring and the
many conversions between character positions and byte positions.

Maybe these could be cleaned up?



reply via email to

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