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.devel Subject: Re: Initial fontification in sh-mode with tree-sittter Date: Tue, 01 Nov 2022 09:13:31 +0200 Message-ID: <83sfj3cfl0.fsf@gnu.org> References: <6C8B0F8E-DF61-4BC3-B0D0-56DBB66BE637@gmail.com> <7AE71CCA-6F18-4DE6-8608-7D9B3E9E52FB@gmail.com> <9BA853EA-8B7F-41A0-A174-D86DF5CE7788@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15812"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mardani29@yahoo.es, jaopaulolc@gmail.com, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 01 08:14:18 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oplTV-0003wk-Te for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Nov 2022 08:14:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oplT5-0000Qt-9t; Tue, 01 Nov 2022 03:13:51 -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 1oplSz-0000K8-VU for emacs-devel@gnu.org; Tue, 01 Nov 2022 03:13:46 -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 1oplSz-0003Dh-HP; Tue, 01 Nov 2022 03:13:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=b4U/HrhtkZgc5vP8rmQCXYgZ7CPVm0HFRCGJba1kmHs=; b=NtnGevZGI9O9Pxfh9VDW IOAItzAH515+WZBpg8xxyuiF0J4oOiYAGahErmWUSDQQLlIwG/TvEmQS7Ud85/KT0pA/2LcSNacTR msyhQw2bXRdynniMvRMXtoHwYSGG4caD2ZYSriXb/dTUgydqtL/VYz/EHcwhu7Px4Ly29a0gEYtSp 4SZ6NFwveZLY4RgQdTnUFZVbpzMRMt4f4ZmF5p07B7emrnDgnrFJtat2ZoWkhBurUzX6kIdhqe5TV rOb4DpUK5B8nfySRZSrhLyRt3aT2AZ03wKRoUJTEx5o4IHH7K/8t4FWeSOmYv/sL8t1XY4ekdMUbP Mql1hFLl9ibYuA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oplSy-0004Wj-Jo; Tue, 01 Nov 2022 03:13:44 -0400 In-Reply-To: <9BA853EA-8B7F-41A0-A174-D86DF5CE7788@gmail.com> (message from Yuan Fu on Mon, 31 Oct 2022 17:25:01 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298909 Archived-At: > From: Yuan Fu > Date: Mon, 31 Oct 2022 17:25:01 -0700 > Cc: João Paulo Labegalini de Carvalho , > emacs-devel@gnu.org > > > Curiously, as soon as I press C-l, the text gets fontified with the > > string face. > > I think that’s just jit-lock & redisplay doing funny stuff. If you set treesit--font-lock-verbose to t, it should log that appropriate faces are applied when you insert the quote. Which means you don't play by redisplay's rules in this case. When Lisp code changes faces, it should remove the 'fontified' property from the text where faces changed. Does your code do that?