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.bugs Subject: bug#59268: [PATCH] Utilize new font-lock faces for C/C++ and Python tree-sitter use Date: Thu, 17 Nov 2022 10:39:13 -0800 Message-ID: References: <_eVZXSOw6ehYHpOX5-Uf76Mz8SW9Q1mqy0mEzCSlKU4p9obGA8eaEPhf5yrFKdG293X9pQw7qvz_JYQKQ9gd9Oxxzn4aazUq-5RSp-8-tok=@rjt.dev> 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="23514"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59268@debbugs.gnu.org To: Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 17 19:40:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ovjoA-0005sZ-8H for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Nov 2022 19:40:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovjnx-0000Nw-De; Thu, 17 Nov 2022 13:40:05 -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 1ovjnv-0000NR-8J for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 13:40:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovjnu-000384-VW for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 13:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovjnu-0000iP-CP for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 13:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59268 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59268-submit@debbugs.gnu.org id=B59268.16687103652702 (code B ref 59268); Thu, 17 Nov 2022 18:40:02 +0000 Original-Received: (at 59268) by debbugs.gnu.org; 17 Nov 2022 18:39:25 +0000 Original-Received: from localhost ([127.0.0.1]:34321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovjnJ-0000hW-7p for submit@debbugs.gnu.org; Thu, 17 Nov 2022 13:39:25 -0500 Original-Received: from mail-pj1-f45.google.com ([209.85.216.45]:53092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovjnF-0000hC-9R for 59268@debbugs.gnu.org; Thu, 17 Nov 2022 13:39:23 -0500 Original-Received: by mail-pj1-f45.google.com with SMTP id b11so2429359pjp.2 for <59268@debbugs.gnu.org>; Thu, 17 Nov 2022 10:39:21 -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=WSnjpF+Tr06f+MUWBW7RErwkeMkGQqmWzQeMW+zOJhc=; b=pJbb7mnkzoybtSd2W+mY4Dg/c2XOesYzYnMCIOCNNT+UGEbdU79mEYL6bO9cUljKmB n0YLRA9BvOgjX+7CvGFkU0t9MCMZJqmPgRFsq7ETSByv6iIDYnQERq685RrSVo0sAzVb GlSb09r/rTwriGQ4OOVjj/QrrE9HhCkZZMF2vs+l4tT4bYlCW18kgHar0wp5s21Vu3eH 04h/2zKurQ7OUZmp+4S843o0UVxVoHpEDbEWt/W8xZ8t3IKzfQTgx6kFeT5TaL1EI2yL SggTelrRnT/e0CsjyaaKIvpCAmIxUDdhmdzfmJw545J3KM5Fuy/TyHdJ9tCw0YdAn4DS tvCA== 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=WSnjpF+Tr06f+MUWBW7RErwkeMkGQqmWzQeMW+zOJhc=; b=aqWKiBpIBjXKVk+DZY0Cuwp1jp7/ITvbeAPNEH01ELuUOvEZnjUo9HA5oFjFVpgCzg OCrDRYPYnvIk8tEnAMuJa7Mdlk8K06x7tdnnopEiMDYn9cLBsn+5jxBiVJhiDwSMnKJu /VBp2hzV61+RvtU9vuw/ixT3mBSSvrWuPm8dE7TDAIc/xI1E2pcCvm+MuvO2HTiRkh53 geOOfsrUm5Ujc/9mQa8CBkrljAV/9sDfEsl19CLo33NlousX+Ga5mCedzPFm6fmE07WE eZXMIMvbi4YJcyMB0em/tudhAmqk/cIPDWNEbmV5QhtVM3VREQr+j67mEEhY5HWh2spe ntmQ== X-Gm-Message-State: ANoB5pn76AZtC/tXjoQrF/beY3IAkLg++5aSEhrshQ5WW9Xt0LSBzd9e B7T85YhnANmthsX0BMwNzh5QyohPap8= X-Google-Smtp-Source: AA0mqf7NaoUHBHkwigPyy/lFSR5N8lBddfH2zdyWaxcFtJjhJKbqDjt/NNzFNzgZRDVnPDbEQBHjMw== X-Received: by 2002:a17:903:2405:b0:176:d59e:3aa with SMTP id e5-20020a170903240500b00176d59e03aamr3954491plo.31.1668710355176; Thu, 17 Nov 2022 10:39:15 -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 b14-20020a62a10e000000b00571f66721aesm1493048pff.42.2022.11.17.10.39.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2022 10:39:14 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248135 Archived-At: > On Nov 17, 2022, at 5:50 AM, Randy Taylor wrote: >=20 > On Wednesday, November 16th, 2022 at 22:39, Yuan Fu = wrote: >=20 >>=20 >> Ah, for making you updating the patch for so many times! I just see = this report. The only comment I have is that I see you removed the field = rule from assignment feature: >>=20 >=20 > No worries! >=20 >>=20 >> - (assignment_expression >> - left: (field_expression field: (_) @font-lock-property-face)) >>=20 >> I envisioned the assignment feature to highlight =E2=80=9Cthe thing = being assigned to=E2=80=9D, in which case it would highlight the field = when it=E2=80=99s in LHS. It=E2=80=99s perfectly fine to have both the = field rule and the assignment rule to highlight fields, I think. So if = you don=E2=80=99t mind, I=E2=80=99d add it back to assignment group. >>=20 >=20 > I removed it because (field_identifier) @font-lock-property-face (in = the property feature) highlights all fields, from what I can tell and = have tested. > Can you show me an example where it won't match? >=20 > Below, when T is a struct: >=20 > T thing; > thing.b =3D thing.b; > thing.b =3D 5; >=20 > b is highlighted as a field in all cases. Ah, the purpose of that rule is to highlight field names in the LHS of = assignments _only_. So if I disable property and enable assignment, I = should see normal field names not highlighted, but field names in LHS of = assignments highlighted. >=20 > Also, I've attached an updated patch: it seems that the = escape-sequence feature needs an override to work (probably because it's = inside a string that's = highlighted?).<0001-Utilize-new-font-lock-faces-for-C-C-and-Python-tree-.p= atch> Thanks. I will add back the assignment field rule and apply, is that ok = with you? Yuan