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, 17 Nov 2022 10:25:57 -0800 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> <8A2361BB-1081-4550-AC29-B9E99BFC2FB8@gmail.com> <42DBD4F5-71D9-434E-B7B4-4E0FF89F934F@gmail.com> 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="30847"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: =?utf-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 17 19:26:40 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 1ovjax-0007pH-OV for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Nov 2022 19:26:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovjaN-0002xM-5X; Thu, 17 Nov 2022 13:26:03 -0500 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 1ovjaM-0002x5-5Q for emacs-devel@gnu.org; Thu, 17 Nov 2022 13:26:02 -0500 Original-Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovjaK-0000q0-JK; Thu, 17 Nov 2022 13:26:01 -0500 Original-Received: by mail-pf1-x436.google.com with SMTP id d192so2619428pfd.0; Thu, 17 Nov 2022 10:25:59 -0800 (PST) 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=nJWOChLlTAh8sq+/jWpqsyB3OdnSEk7iau74AIc+9kc=; b=QVhi283oL9e4dDcA62XLlXxiCljQ0+29HsGObbuv52RjIgcmIagSOzc9NHxp/kSG5F LHIHeCvAm3ablBRZhN3qTu+ogyvtySquRye4NaSxJLfkGaCbp58bmY3WvsWxCpajQpml CPqdjP8yGLqXLTi33L4YAWxQV5BsDDNEQM+c1KckGh4F28dycj5K6DIlRyq6VGXfRi45 ZqyCrn0rnnGt6DunIVqfRML2ijzDcRaOcE7zWS91sn3jIU6ZmebxMvTtndOyFEgV/cci v4HvadAWWOI4xbh2CFy/anGrZs9B9MQdfC4iAUtr6h/3otf4xCG7iCLxd1Fbh0JXdWks Cktg== 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=nJWOChLlTAh8sq+/jWpqsyB3OdnSEk7iau74AIc+9kc=; b=Ni9jDiUjvQbZTcab08Uyw9SQ+Y28Y7VSOsE6Dvc1es4kPVqzSpeSaOrrwby9o7ecFv /sgevRVuG9t1ggOuZYsfQAu2WPEH8whkZthEnaDbRafZ4ijDt8tF+ArjEala15j1V0FI irgTzD+IJ3i52wHXVoyhVSNF55vXFrwfd4Tlv5HY1hENgwyj/1zM5MaW7s7Znf36yWfv yNzZ82TYhHsWfyOAha1EqGd6zW3SLnzYLH0NKSNDsoVqa2NNBofK8nMwz/Gqa3ptMDcj cVGzsxr7kIsYWN0BBsCYP1EuRzgR2SL1HH4WILdKV7GXpRmWtT9bCEW+kp4q5onxZ/YD ZEzA== X-Gm-Message-State: ANoB5pmIyIjud6mb6XYgf/5HuscvBuLDJlo8QZA2t1Zr04V/jVh40O2J 9y/RJu2tGUBwkpKHCsmCrA5QeW5kZ4o= X-Google-Smtp-Source: AA0mqf5MlX13LDl5PBDbZ8EBaM/om2NRiot/NSrMei3IJZsPnyMEcS1OYVd2R0p5KAG/VL34cxQnzg== X-Received: by 2002:a63:4e0e:0:b0:46e:bfec:d611 with SMTP id c14-20020a634e0e000000b0046ebfecd611mr3103383pgb.281.1668709558860; Thu, 17 Nov 2022 10:25:58 -0800 (PST) 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 mr9-20020a17090b238900b00203ab277966sm3927721pjb.7.2022.11.17.10.25.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2022 10:25:58 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=casouri@gmail.com; helo=mail-pf1-x436.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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300059 Archived-At: > On Nov 16, 2022, at 7:57 AM, Jo=C3=A3o Paulo Labegalini de Carvalho = wrote: >=20 > =20 > +(provide 'sh-mode) > +;;; sh-mode.el ends here >=20 > Is there any particular reason why you changed sh-script to sh-mode? >=20 > Good catch. That must have been the result of an unintended = replace-string. >=20 > Here is the patch without that silly change. (It might not be that = silly, as other progmodes are named -mode? But that can be a = separate patch). Thanks! I applied your patch and made a few changes, the fist commit has = stylistic changes, the second has some feature changes: For the stylistic changes: 1. I added commit message for your patch as an example. For future = patches it=E2=80=99s best if you can also have this ChangeLog style = commit message, I think you can find more detailed explanation in in = CONTRIBUTE file. (I don=E2=80=99t know if you know the following already, bug FYI:) 2. Docstring sentences always end with a period 3. All comments and sentences should be complete sentences, with two = spaces at the end. 4. The first line of a docstring shouldn=E2=80=99t exceeds 80 columns. For the second commit, I changed all the feature names to singular, and = decl-commands to declaration-command. I also simplified the rule for = declaration-command, IIUC you want to highlight the command keywords? Also, right now these command keywords are highlighted in builtin face, = should they be fontified in keyword face? I=E2=80=99m no expert of bash = so I can=E2=80=99t tell. But keyword face seems more natural to me. Yuan=