From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71384: treesit-font-lock-fontify-region unnecessarily re-unfontify's Date: Thu, 06 Jun 2024 08:34:13 +0300 Message-ID: <86jzj2iqi2.fsf@gnu.org> References: <1BA07683-10C0-4335-8C35-C260D049908B@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28449"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71384@debbugs.gnu.org To: JD Smith , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 06 07:41:02 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sF5ry-0007AP-BI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Jun 2024 07:41:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sF5rl-0004ff-Es; Thu, 06 Jun 2024 01:40:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sF5rj-0004fT-SO for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 01:40:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sF5rj-0001Hy-L1 for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 01:40:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sF5ry-0007jJ-1P for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2024 01:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jun 2024 05:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71384 X-GNU-PR-Package: emacs Original-Received: via spool by 71384-submit@debbugs.gnu.org id=B71384.171765242029621 (code B ref 71384); Thu, 06 Jun 2024 05:41:02 +0000 Original-Received: (at 71384) by debbugs.gnu.org; 6 Jun 2024 05:40:20 +0000 Original-Received: from localhost ([127.0.0.1]:39580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sF5rH-0007hf-Sv for submit@debbugs.gnu.org; Thu, 06 Jun 2024 01:40:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sF5lr-0007WL-4h for 71384@debbugs.gnu.org; Thu, 06 Jun 2024 01:34:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sF5lX-0008Sg-4L; Thu, 06 Jun 2024 01:34:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=g2P0hbrm2awXx+/bOGRZpJx4NPxu5WXAb59nTav+R5c=; b=i6IDRZrwULM1 7xS4Fu8K8uJ9yZKbfCWc4OrzeoNGZFDKk8RymSzcvCQUuohRbKnQg94Yl42HhUOzH31CGkIfDPHnR yxh7kjcfQrJpSFoJdPmiXmoSEXRbscd1rEL2TLn/bnSJXDe64/ZuXiogYOZwuoF9KfCqVzlrpbeSo qwqO0kOqMHIKbECb7IHph5BUtBn/dHcQsrdzan0NZlv3iIePz2FIbuUEBNY+QPJGbSjV7bZMQsjY6 yEWWm7nO0nrTLEPLZoZsm2SjwtrsG77KmGKZsPFhHSSdapNPCpc1NTv7LauVV5oMaz4pjsGuqS0xT 2WDl0w9/M9DbkDVKUsRdmA==; In-Reply-To: <1BA07683-10C0-4335-8C35-C260D049908B@gmail.com> (message from JD Smith on Wed, 5 Jun 2024 18:06:54 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286653 Archived-At: > From: JD Smith > 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.