From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Initial fontification in sh-mode with tree-sittter Date: Thu, 3 Nov 2022 00:16:11 -0700 Message-ID: References: <6C8B0F8E-DF61-4BC3-B0D0-56DBB66BE637@gmail.com> <7AE71CCA-6F18-4DE6-8608-7D9B3E9E52FB@gmail.com> <9BA853EA-8B7F-41A0-A174-D86DF5CE7788@gmail.com> <83sfj3cfl0.fsf@gnu.org> <03309451-1AEB-458C-88FD-9715CECC27A2@gmail.com> <83mt9bc9ke.fsf@gnu.org> <8335b19ndr.fsf@gnu.org> <39ECD413-BD10-4BF3-90AC-36F02276607E@gmail.com> <83pme48ryv.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31520"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jaopaulolc@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 03 08:17:14 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 1oqUTS-00081W-OI for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Nov 2022 08:17:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqUSk-0006fp-Cv; Thu, 03 Nov 2022 03:16:30 -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 1oqUSa-0006Up-Jf for emacs-devel@gnu.org; Thu, 03 Nov 2022 03:16:22 -0400 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqUSX-0007eS-2p; Thu, 03 Nov 2022 03:16:19 -0400 Original-Received: by mail-pf1-x42d.google.com with SMTP id v28so833020pfi.12; Thu, 03 Nov 2022 00:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jesGiemZ0f/fPFNntD260ZkmJ8IkE5lKwM6n9iQx+us=; b=CDcraEgkupp56SLg4qsdlUhDuOlhs+8X3Bz9pqkcIj9/3wGoPhx9fs+mmH4DDo5izb evmhtAyFzrer1QXNxXehkN5JWPgjW58wvgPC2GKMz66/YAbgeiEKisEahI8AVVXtIlhS HLTc96ojWJlIXo57WnJEHW2ffERmEybg3KHAR7iiiud1f9td7PvANCiOkRUi4Su/1kae xTsknWogcUvv42RuyNG5fxwxfUa8v+3yepdWeHBRIDFjcPD6QDzzUZnXDkBP+pJYs4+T PtNwoAJDILivZ8S1Iao00jAB8LLQhiPtBe34gZIXwgWqem6mFOlQfaipWZDbo7pocg4E g3ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jesGiemZ0f/fPFNntD260ZkmJ8IkE5lKwM6n9iQx+us=; b=oIHTOOu3NWa5VfWrkCaZN2nmiArIlx18DSRnDa9hDBt2L6k1e3cCqCLqbfWP6yDgCy RrgTnLz2cak1B6386o/Uvu4RVt/EWex+TfOMI3wW0zOOP7pqwyq7Hn6kHKl/Pqh3Sedr iRIbHn+DXbatMS7s+GrVZcSOEUMVWcA0lNf7WLRspU+9rlpcDI8tFj5U5566BPuan9zN c2nhbtolCgxjwyNgzQt0Q6UIdFBfrADc/uKgDYx95WZnHQp6ixOoxhtPsG8N1tbvijMZ BiT+NvTHrabVPzkFPDnXsbzcgpzB/91ERmH5xeBp249EDa/Bxm5NmrJ6rWQNws2UsNTX 7Dag== X-Gm-Message-State: ACrzQf2gH2QKioJfrXUzj0tOu+wzK3mRKwp4U0mqJLE4d5xswBxnopFW uiWbH27ULUYK2AkU91ipBNKaO8GWZJc= X-Google-Smtp-Source: AMsMyM7S4esyft92PVHgr3nRNntTA8ahWL9F43UXNlvIw6SWnE5PS5fq1y5d1Luji+A3aP5BkCj3zA== X-Received: by 2002:a05:6a00:a21:b0:562:99d6:c30a with SMTP id p33-20020a056a000a2100b0056299d6c30amr28317245pfh.35.1667459773860; Thu, 03 Nov 2022 00:16:13 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id b8-20020a1709027e0800b00186a68ec086sm6269859plm.193.2022.11.03.00.16.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Nov 2022 00:16:13 -0700 (PDT) In-Reply-To: <83pme48ryv.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=casouri@gmail.com; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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@gnu.org Xref: news.gmane.io gmane.emacs.devel:299061 Archived-At: > On Nov 2, 2022, at 11:36 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Wed, 2 Nov 2022 18:25:13 -0700 >> Cc: Jo=C3=A3o Paulo Labegalini de Carvalho , >> emacs-devel@gnu.org >>=20 >> What I ended up doing is to set jit-lock-context-unfontify-pos to the = beginning of the string node (aka beginning of region A). Then in a = timer jit-lock-context will refontify everything after that position. = And I have some measure to break possible infinite recursion (fontify = region -> set jit-lock-context-unfontify-pos -> cause refontification -> = fontify region -> =E2=80=A6). >=20 > OK, but beware of the case where region A is very large. Could > performance suffer in such cases? That=E2=80=99s no problem, region A is still jit-locked, it=E2=80=99s = only refortified when displayed. Yuan=