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: Sun, 30 Oct 2022 19:13:07 -0700 Message-ID: <6C8B0F8E-DF61-4BC3-B0D0-56DBB66BE637@gmail.com> References: 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="3318"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= , emacs-devel@gnu.org To: =?utf-8?Q?Daniel_Mart=C3=ADn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 31 03:14:06 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 1opKJS-0000f5-Bl for ged-emacs-devel@m.gmane-mx.org; Mon, 31 Oct 2022 03:14:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opKId-0000Kj-MZ; Sun, 30 Oct 2022 22:13:15 -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 1opKIc-0000Jk-2A for emacs-devel@gnu.org; Sun, 30 Oct 2022 22:13:14 -0400 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opKIa-0001u0-Hx for emacs-devel@gnu.org; Sun, 30 Oct 2022 22:13:13 -0400 Original-Received: by mail-pl1-x631.google.com with SMTP id c2so9530252plz.11 for ; Sun, 30 Oct 2022 19:13:11 -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=IBFGMwh8Pe/fg+3y1EH9yZZno9NufekFj84P+enRvRg=; b=j3WLN8ry11/2GY239kCJWg7iAO/95A6YQvFvHtJso4dnURT4f/MsO+NsdC8SlE5ySD DpeFjlRyWbU5cK1lDNcPLk4RSbU1QziXdeTRQfvf4D5R6S4hA0hL4syW/DyKmR9E2WEJ PFoYiH83Q6P2f1++BJkIFwdPSMWM5RQwebjICjpYKVOaiAQm9zbn03/kIAXVqRNeVhtt B9UsV+uSMWTmwbLNqNat11AuU934XR81MWkShEhqVgef+SkwVDuAZT5N7nup6O2cd3pB QvD3OX2jXjv2GJ7kshONH7tQLUYEZmst8xyJ+xBXhn85pCjYSJrFhSd5zXo51wTtvBy0 g/dw== 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=IBFGMwh8Pe/fg+3y1EH9yZZno9NufekFj84P+enRvRg=; b=EEpQ6iXzzg1zZuB+Eip0YlJKMep2V+nHuRc+hChDJZ8lneYbKWts4EUI8JUeUSPQG/ aAeNa1acxGI+O8h1ifbQN3GjCayVYnRyxnyNyQwvBbI0OJXNc9T4COyJXFNk/dHTfzie 2LuSD2hxSBQO7+rH5H/AgMEQpMLsr5rAwwETw7UKUHMokkMJjnSHnJz5Ikvr5kP5m2hW nTWqRPDoFKKP22jaVsFCFXuVGGMh67Od9B1r0zVg6AkWML8/VCwWYrcD/DfcBwRgP7V8 fsDGuGmMXocCOQWXlOxFGM5zFD0ZRL6kgfqShqQxslIQAbL7pmJdBm4jWxpDgXpNmnju 679Q== X-Gm-Message-State: ACrzQf3vvKP64zPiKBDOoztiNnIzLpRvn74ojKjyDeNE9N00ucW+hfMj zoxLzhyI68W+RXX2GAJ11AI= X-Google-Smtp-Source: AMsMyM5sTzYLTukhRqtRC88LplQ6o33bAdN43hA1m3smvOJOmf9ZGZFJvyIyh/DiCZaoSFqVn3BtTQ== X-Received: by 2002:a17:902:d503:b0:187:19c4:f9db with SMTP id b3-20020a170902d50300b0018719c4f9dbmr5342774plg.82.1667182390658; Sun, 30 Oct 2022 19:13:10 -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 n2-20020a170902d2c200b00176d218889esm3245195plc.228.2022.10.30.19.13.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Oct 2022 19:13:10 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=casouri@gmail.com; helo=mail-pl1-x631.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:298834 Archived-At: > On Oct 28, 2022, at 8:09 AM, Daniel Mart=C3=ADn = wrote: >=20 > Yuan Fu writes: >=20 >>=20 >> Hmmm, I couldn=E2=80=99t reproduce this in python-mode, also defun is = not recognized in python so I used this snippet: >>=20 >> def foo(): >> Return 42 >>=20 >> When I insert =E2=80=9C=E2=80=9D=E2=80=9D before the defun, = everything after becomes string face, when I insert the following = =E2=80=9C=E2=80=9D=E2=80=9D, everything is updated again. >>=20 >> I didn=E2=80=99t make any significant change to the font-lock code = recently, either. >>=20 >=20 > I can reproduce the problem by following these steps: >=20 > emacs -Q from top of the feature/tree-sitter branch > M-: (require 'treesit) > M-x customize-variable treesit-settings RET > Set "Activate" to "Yes" and apply the change. > C-x b sample.py RET > M-x python-mode > Write the following program: >=20 > def main(): > return 0 >=20 > M-< C-o """ (the code is not fontified as string) > M-> """ (the code is not fontified as string) > M-x python-mode RET (the code _is_ fontified as string) Thanks, I can reproduce this on emacs -Q, too (but strangely not on my = =E2=80=9Cconfigured=E2=80=9D Emacs). >=20 > A git bisect tells that the first bad commit is > 5159789e55d64c7482dff3dc1a621d01f530f83c Strange, this commit has nothing to do with font-lock, hmm... >=20 > Hope this helps. Yes! Many thanks. Yuan