emacs-devel
[Top][All Lists]
Advanced

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

Re: Question: add-face-text-property for 'font-lock-face?


From: Ihor Radchenko
Subject: Re: Question: add-face-text-property for 'font-lock-face?
Date: Mon, 30 Aug 2021 16:22:52 +0800

Qiantan Hong <qhong@mit.edu> writes:

> That’s an option, but I’m worried about performance because 
> crdt-visuallize-author-mode
> need to color code the whole document and that might be too many overlays.
> Maybe one can lazily create overlay for visible part only but I feel like
> at that point I’ll probably just reinvent an adhoc 
> add-font-lock-face-text-property in Elisp.

What about hooking directly into font-lock? If you change faces as part
of font-locking process, they will be properly transferred into
'font-lock-face property.  Fontifying within font-lock framework will
also benefit form lazy fontification when jit-lock-mode is enabled.

Best,
Ihor



reply via email to

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