all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: JD Smith <jdtsmith@gmail.com>, Yuan Fu <casouri@gmail.com>
Cc: 71384@debbugs.gnu.org
Subject: bug#71384: treesit-font-lock-fontify-region unnecessarily re-unfontify's
Date: Thu, 06 Jun 2024 08:34:13 +0300	[thread overview]
Message-ID: <86jzj2iqi2.fsf@gnu.org> (raw)
In-Reply-To: <1BA07683-10C0-4335-8C35-C260D049908B@gmail.com> (message from JD Smith on Wed, 5 Jun 2024 18:06:54 -0400)

> From: JD Smith <jdtsmith@gmail.com>
> Date: Wed, 5 Jun 2024 18:06:54 -0400
> 
> 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.

Why is that duplicate call a problem?  We don't say that
treesit-font-lock-fontify-region _must_ be called _only_ from
font-lock-default-fontify-region, do we?

Adding Yuan in case he has comments.





  reply	other threads:[~2024-06-06  5:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 22:06 bug#71384: treesit-font-lock-fontify-region unnecessarily re-unfontify's JD Smith
2024-06-06  5:34 ` Eli Zaretskii [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86jzj2iqi2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71384@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=jdtsmith@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.