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#71784: 31.0.50; Inconsistent fontification for field_identifier in c++-ts-mode Date: Thu, 27 Jun 2024 00:16:13 -0700 Message-ID: References: <87pls394h0.fsf.ref@aol.com> <87pls394h0.fsf@aol.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) 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="24102"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71784@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 27 09:18:24 2024 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 1sMjOi-00060Z-4Y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Jun 2024 09:18:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMjOL-000151-G9; Thu, 27 Jun 2024 03:18:01 -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 1sMjOJ-00014C-WD for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2024 03:18:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMjOJ-00071K-Hq for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2024 03:17:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sMjOM-0005U6-7e for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2024 03:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jun 2024 07:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71784 X-GNU-PR-Package: emacs Original-Received: via spool by 71784-submit@debbugs.gnu.org id=B71784.171947265621049 (code B ref 71784); Thu, 27 Jun 2024 07:18:02 +0000 Original-Received: (at 71784) by debbugs.gnu.org; 27 Jun 2024 07:17:36 +0000 Original-Received: from localhost ([127.0.0.1]:40868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMjNv-0005TQ-Mq for submit@debbugs.gnu.org; Thu, 27 Jun 2024 03:17:35 -0400 Original-Received: from mail-pg1-f172.google.com ([209.85.215.172]:53527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMjNt-0005T7-WC for 71784@debbugs.gnu.org; Thu, 27 Jun 2024 03:17:34 -0400 Original-Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-7182a634815so4205130a12.3 for <71784@debbugs.gnu.org>; Thu, 27 Jun 2024 00:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719472585; x=1720077385; darn=debbugs.gnu.org; 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=ve1m03rOb5qYd0YPl+Zvls1k8BX+5d6lS5sk8BocOoU=; b=guvaLS+rTik+F7jVC44+s/Yu0cGgGNX4ouivHvyzWHHpLrjKxyKhZ7dKt5SZGKgFOq oUcsSARqXehY7wifupdMh/jk9tr8gbCEVh7Cz/MQvhoMVngwDzmXOXcpW7y32Bngg9YL jjM4PTk8xOwUjKT4MYqCeSX+vF1XR7aYu4ueZksMdsbqOOp7hkiTw5TZYPy9lN0Znc4R Pc3vLxNFC0N3V7522ypxHsgHApX/g7lyjq6fBh+n2KiZC1lZ/Rm9mpz0iiKxt3xW7Exp vWeHT8RURYUJNkr/7nI6OUNuU8YmoJ86X8KGvI8YwgxGUSO9n+TUGBA+srAJJCB38TzT k8jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719472585; x=1720077385; 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=ve1m03rOb5qYd0YPl+Zvls1k8BX+5d6lS5sk8BocOoU=; b=prclI04SjViONAJcWxfUrDJBdBFDzo/dtlwAinSOtyHwtMLP2M2S83+GPZpDaW8J4T NZSypV40PUafikdrsIO4Da3fTWVNSnvjUvQ4EtbEfVQ5vEqS0M97GutqBpkbhlu9HBX7 7zrddfBWe2vAN340lFaG8Ve6loyU8up17Uga6rxXJc/JANs8Z6F281LsjFek4+yg/7um EJYwXoHFJQDK6fkmO4g5P229r2qf7YCVIn+fn9k3/COceDTXq37QxEdhFTLwxFcdm504 8k9RM7mnem5gVdA9kVErjKKAADMxVcP9JoBp3uNWXT7NUyUAvRTh958vIXkYgX5rBnBS HT3Q== X-Gm-Message-State: AOJu0Yz1UvzGU08L25JQAwUP7H4DuVg2mJjO4rLin5tVKy+NAA7XjVxe gBXVIdIvoGK6XnGPPIDkbd1Alavpe7ouvndA5wWKXCkm347w/oBY X-Google-Smtp-Source: AGHT+IFh4INCZH775ZsoLWCLuXf3CNQsUk8APfx4yxCw+WSZGyFqaDtyAIr8U0FrNdwFjHE8itrAKQ== X-Received: by 2002:a17:90b:1a91:b0:2c4:af82:32af with SMTP id 98e67ed59e1d1-2c8612d8beamr10741798a91.22.1719472585209; Thu, 27 Jun 2024 00:16:25 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:3c6b:9027:64f0:9805]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c8fe8ac6fbsm705213a91.6.2024.06.27.00.16.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2024 00:16:24 -0700 (PDT) In-Reply-To: <87pls394h0.fsf@aol.com> X-Mailer: Apple Mail (2.3774.600.62) 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:287987 Archived-At: > On Jun 26, 2024, at 7:13=E2=80=AFAM, Ergus via Bug reports for GNU = Emacs, the Swiss army knife of text editors = wrote: >=20 >=20 > Hi: >=20 > Using the c++-ts-mode I found that there is some inconsistent > fontification for the `fields_identifier`: >=20 > See the fontification in this example with `emacs -Q`. >=20 > ```test.cpp >=20 > std::string key; > bool inserted; >=20 > struct name_t { > std::string key; > bool inserted; > }; >=20 > name_t keys =3D {"aaa", true}; >=20 > keys.inserted =3D false; > bool a =3D keys.inserted; > ``` >=20 > 1. The `keys.inserted` values are shown differently before or after = the > =3D (the inserted word is fontified is some cases, but not in all) What=E2=80=99s the value of treesit-font-lock-level for you? If it=E2=80=99= s 4, they should be fontified the same. On level 3, only LHS is = fontified. >=20 > 2. The variable names are fontified differently outside or > inside the struct. I mean, the =E2=80=9Cvariable name=E2=80=9D inside a structure is a = field, not a variable, so it makes sense that they are fontified = differently. Variable has font-lock-variable-name-face, field has = font-lock-field-name-face. Also variable and field face are the same in = the default theme, so they should look the same nevertheless. >=20 > 3. The escape sequence (\t) is fontified differently to the rest of = the > text inside the string. I don't know if that is intentional or not. If > it is intentional, just ignore this comment. Yeah it=E2=80=99s intentional. >=20 > The inconsistencies 1 and 2 are not only different to c++-mode but = they > are semantically incorrect. Yuan=