From: JD Smith <jdtsmith@gmail.com>
To: 71384@debbugs.gnu.org
Subject: bug#71384: treesit-font-lock-fontify-region unnecessarily re-unfontify's
Date: Wed, 5 Jun 2024 18:06:54 -0400 [thread overview]
Message-ID: <1BA07683-10C0-4335-8C35-C260D049908B@gmail.com> (raw)
The function treesit-font-lock-fontify-region in treesit.el calls (font-lock-unfontify-region start end) right away (see below). But this function is called as the value of font-lock-fontify-syntactically-function from font-lock-default-fontify-region, which has just itself made the exact same call to font-lock-unfontify-region. I commented out that superfluous call in treesit-font-lock-fontify-region and noticed no ill effects.
(defun treesit-font-lock-fontify-region (start end &optional loudly)
"Fontify the region between START and END.
If LOUDLY is non-nil, display some debugging information."
(when (or loudly treesit--font-lock-verbose)
(message "Fontifying region: %s-%s" start end))
(treesit-update-ranges start end)
(font-lock-unfontify-region start end)
next reply other threads:[~2024-06-05 22:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 22:06 JD Smith [this message]
2024-06-06 5:34 ` bug#71384: treesit-font-lock-fontify-region unnecessarily re-unfontify's Eli Zaretskii
2024-06-06 11:35 ` JD Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1BA07683-10C0-4335-8C35-C260D049908B@gmail.com \
--to=jdtsmith@gmail.com \
--cc=71384@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).