On January 6, 2020 6:39:02 AM GMT+02:00, HaiJun Zhang <netjune@outlook.com> wrote:
Could someone explain how the jit-lock in Emacs works in the following
case?
1. emacs -Q
2. open the attachment file and goto end of buffer
3. M-x desktop-save and quit emacs
4. emacs -Q
5. M-x desktop-read
I see the buffer is fontified correctly. Does it parse the whole
buffer?
在 2020年1月6日 +0800 AM11:42,Eli Zaretskii <eliz@gnu.org>,写道:
"alan@idiocy.org"From: arthur miller <arthur.miller@live.com>
CC: "monnier@iro.umontreal.ca" <monnier@iro.umontreal.ca>,
buffer (region) just before it is to be<alan@idiocy.org>, "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Date: Sun, 5 Jan 2020 20:28:43 +0000
When I said batch-processing I ment processing a file or chunk of
expansions or similar.displayed to a user. Same for other "insertions" from macro
that
Then we always do "batch processing", because the display engine has
no good idea what exactly changed in the buffer. So it always
processes some minimal chunk of text that it can prove to itself
the changes were all inside that chunk.Tree-sitter seems to be very expensive regex engine
I also don't think teee-sitter is needed for syntax coloring.
especiallyin that case.
They claim to be less expensive than regexp-based coloring,
with very long lines.
We never parse the whole buffer, only its chunk that is slightly larger than what would be actually displayed in a window.
This works by the display engine calling the fontification-functions for the buffer text it is about to display, whenever it finds a chunk of text whose 'fontified' text property is nil.