Subject: Re: bug#64321: 29.0.92; Tree-Sitter/which-function Narrow/Widen causes modified buffer

From: Troy Brown <[email-masked]>
Date: Wed, 28 Jun 2023 12:25:02 -0400

On Wed, Jun 28, 2023 at 12:04 AM Yuan Fu <[email-masked]> wrote:
>
> Narrowing and widening are transparent to tree-sitter, so when the buffer widens, from tree-sitter’s POV, text are added to the buffer. Which-func calling the tree-sitter current-defund function ultimately leads to tree-sitter calling treesit—font-lock-notifier which puts text properties on the “added” portion of the buffer, which changed the modified status.
>
> treesit—font-lock-notifier should put text properties without changing modified status, like what jit-lock does. This patch should fix it.
>

Thanks for the explanation and the supplied patch.  I can confirm that
this patch fixes the issue.