GNU bug report logs - #71784
31.0.50; Inconsistent fontification for field_identifier in c++-ts-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Ergus <spacibba@HIDDEN>; dated Wed, 26 Jun 2024 14:15:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 71784 <at> debbugs.gnu.org:


Received: (at 71784) by debbugs.gnu.org; 27 Jun 2024 14:34:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 27 10:34:15 2024
Received: from localhost ([127.0.0.1]:43089 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sMqCV-00064r-DU
	for submit <at> debbugs.gnu.org; Thu, 27 Jun 2024 10:34:15 -0400
Received: from sonic315-13.consmr.mail.bf2.yahoo.com ([74.6.134.123]:36752)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1sMqCS-00063y-Q3
 for 71784 <at> debbugs.gnu.org; Thu, 27 Jun 2024 10:34:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1719498841; bh=ctjH9F38/rsScJ1oA05r3JQ7rnJ2b26nbioHICbr5y4=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To;
 b=pmsouQkqe08LL+fshdnLlmX58hOAQCtH6gC0lQmkn+m+NyBqcqcFEW00O4LdyahtH1ieAZRZiXjl9AXdl6GAfub5JEuGE9/CZp+01YgcRK2HX4N1Clfh0igf+sH6smVj+72XThgWRQMlObY5cBg80N6xj3/DB/L9B9uKtHKqZCsUCy/EyvqXSlKiECFhTFdbZKxUJr+lM2YzOvE5U+dL9C68fuJs29F78VLfaT4Q7LIPl6w6xUi/e6fKxgr93jQSI1UFaxQsTqrNShn6wKEFDGtuBvbh7bJ0lMH7eLfUF+T5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j_Y6TRK7jw.K8Sa.omQs8V4ibds_asmQ
 IjINFDOgWOE..plAN4jbjDx1NtBVGf3V8DXWpWVf.2fiT69gHLBUnrpEp26bZdSBlRrAeVbMmEaS
 dGCgZT8Xb2BusEMOp7FP9UUdUJJfALLH7GBJLofVBO8cpqrKonixdrHc6L8TYlQEHGhRoGVM4m0C
 GRtjPrCpiy_jEVWnwkFCRJJDU.UntO7de3TMgi_FM_HSkHM_VELyN9juJbRiW29b7myV5hl5OxyL
 d8.0.SRhWVGQWEnG7eZ_vV5ha7Ck1ymXm4bYKjQJjTi23ymlRWN6was4ic_wv4gd93Cg7dTqLl21
 ZqDS9mVQlv0x.ItA055JddYysowonmGnQ2HZeIA5gZdYcno4XEjWY_l.6cpZ450xXaVyWWomn..h
 _N_j7efaksFpWua5IWgH2begTW3IucnGpVov.QHrN0VCSTlCOIt9ulevT4SFtE9t5Yip6DSRM8_q
 ij3.7bdXWw33uWqnvcO57u9sAcT8K3ZpmXBDcpZ8B3L9ZkDNzRk5c9MXMfNItO80FczXancFxcuf
 nHcz.QhglVOCVEkpdrwVwGyfDKP2fSrCCbM5pXO_m16O7OAM86D24DMLq0lg6f3xobLZdpDudkrC
 G7A38GeWnHI4jbdLdnu3OUIlS_ul2OUMAWbNw0Hnyj_72bbcsO2bVbURYXjVNsOKfI7PkB3W7lCt
 ACZO_0w--
X-Sonic-MF: <spacibba@HIDDEN>
X-Sonic-ID: dda9a1a5-0ce4-4b07-89b5-97264b5f9201
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic315.consmr.mail.bf2.yahoo.com with HTTP; Thu, 27 Jun 2024 14:34:01 +0000
Received: by hermes--production-ir2-85cf877599-59p75 (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID 74ce5f1696122838d8ea78fa8bc630b3; 
 Thu, 27 Jun 2024 14:33:55 +0000 (UTC)
Date: Thu, 27 Jun 2024 16:33:54 +0200
From: Ergus <spacibba@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
Subject: Re: bug#71784: 31.0.50; Inconsistent fontification for
 field_identifier in c++-ts-mode
Message-ID: <dh7hjyhyn2hqyi4dhvuhnwbufojbvtfhyrssclbjvnmkn7eokd@ylcn65fuw7ck>
References: <87pls394h0.fsf.ref@HIDDEN> <87pls394h0.fsf@HIDDEN>
 <C7837F8F-C654-43BC-92B4-D72CEA153AE7@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <C7837F8F-C654-43BC-92B4-D72CEA153AE7@HIDDEN>
X-Mailer: WebService/1.1.22407
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol
Content-Length: 2913
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71784
Cc: 71784 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Yuan:

Very thanks for replying

On Thu, Jun 27, 2024 at 12:16:13AM GMT, Yuan Fu wrote:
>
>
>> On Jun 26, 2024, at 7:13 AM, Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs@HIDDEN> wrote:
>>
>>
>> Hi:
>>
>> Using the c++-ts-mode I found that there is some inconsistent
>> fontification for the `fields_identifier`:
>>
>> See the fontification in this example with `emacs -Q`.
>>
>> ```test.cpp
>>
>> std::string key;
>> bool inserted;
>>
>> struct name_t {
>> std::string key;
>> bool inserted;
>> };
>>
>> name_t keys = {"aaa", true};
>>
>> keys.inserted = false;
>> bool a = keys.inserted;
>> ```
>>
>> 1. The `keys.inserted` values are shown differently before or after the
>> = (the inserted word is fontified is some cases, but not in all)
>
>What’s the value of treesit-font-lock-level for you? If it’s 4, they
>should be fontified the same. On level 3, only LHS is fontified.
>
You are right; it is 3 in my system.

However I would expect that treesit-font-lock-level will be equivalent
somehow to using font-lock-maximum-decoration with similar value.

I think it is confusing having two different fontifications for the same
variable due to their position. The colors are supposed to be a sort of
hint or help for the programmer eyes; not just a decoration right?

>>
>> 2. The variable names are fontified differently outside or
>> inside the struct.
>
>I mean, the “variable name” 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.
>
Probably what annoys me is the difference with the previous behavior in
this case. A field is also a variable in some sense for C++. There is
not much difference with a variable in a namespace or a static variable
in a class... 

Does it makes sense not to colorize these "field" and LHS on level 3
(like it used to be in c++-mode)? But put the new fontifications all
together in level 4? In that way everything will be fontified in level 4
and will become immediately consistent.

>>
>> 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’s intentional.
>
Ok, good! Again, (just as a suggestion) it makes sense to move this new
fontification to level 4 as well?

>>
>> The inconsistencies 1 and 2 are not only different to c++-mode but they
>> are semantically incorrect.
>
>Yuan


Just to mention: I am not wondering about the match/compatibility with
c++-mode. I am only concerned about the semantic coherence of the
fontification; which is supposed to be somehow helpful, not confusing.

Thanks again,
Best
Ergus




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71784; Package emacs. Full text available.

Message received at 71784 <at> debbugs.gnu.org:


Received: (at 71784) by debbugs.gnu.org; 27 Jun 2024 07:17:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 27 03:17:36 2024
Received: from localhost ([127.0.0.1]:40868 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sMjNv-0005TQ-Mq
	for submit <at> debbugs.gnu.org; Thu, 27 Jun 2024 03:17:35 -0400
Received: from mail-pg1-f172.google.com ([209.85.215.172]:53527)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1sMjNt-0005T7-WC
 for 71784 <at> debbugs.gnu.org; Thu, 27 Jun 2024 03:17:34 -0400
Received: by mail-pg1-f172.google.com with SMTP id
 41be03b00d2f7-7182a634815so4205130a12.3
 for <71784 <at> 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)
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)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\))
Subject: Re: bug#71784: 31.0.50; Inconsistent fontification for
 field_identifier in c++-ts-mode
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <87pls394h0.fsf@HIDDEN>
Date: Thu, 27 Jun 2024 00:16:13 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <C7837F8F-C654-43BC-92B4-D72CEA153AE7@HIDDEN>
References: <87pls394h0.fsf.ref@HIDDEN> <87pls394h0.fsf@HIDDEN>
To: Ergus <spacibba@HIDDEN>
X-Mailer: Apple Mail (2.3774.600.62)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71784
Cc: 71784 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Jun 26, 2024, at 7:13=E2=80=AFAM, Ergus via Bug reports for GNU =
Emacs, the Swiss army knife of text editors <bug-gnu-emacs@HIDDEN> =
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=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71784; Package emacs. Full text available.

Message received at 71784 <at> debbugs.gnu.org:


Received: (at 71784) by debbugs.gnu.org; 26 Jun 2024 22:25:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 26 18:25:05 2024
Received: from localhost ([127.0.0.1]:40565 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sMb4b-0003FX-5h
	for submit <at> debbugs.gnu.org; Wed, 26 Jun 2024 18:25:05 -0400
Received: from sonic305-3.consmr.mail.bf2.yahoo.com ([74.6.133.42]:34326)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1sMb4Z-0003Ez-KP
 for 71784 <at> debbugs.gnu.org; Wed, 26 Jun 2024 18:25:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1719440694; bh=SQvGSsa/X1MQ+N0UFsyzhE7LcU7U7z6LIC5Ecw4dze4=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To;
 b=aD3sKaKHbH1j1ysu2xMySx+ADFLBg12NwMV7JDFmpIvwQuncFiUBN2rzg4pk/Nu52wK1m9pI60j039hlphuoGQJ6uloqTuLXxKOa8hd4QKaSjz0C6dotBTGMpMtodz5op4UUhQX1BL1mWtIk/ocdAF60c32Zokm1/3TIjdNBpaR/DV7U81fL8qEOonp0AT1avZkk9rHLqVuflzJdyB/ZFsJB39VMvq2oG+HL8CYxWkMzr6PGgJR8PvQ+GQjvS1yLJhcU4dnNBMSyjNrqPZKjKNbL/Znr5RmLYaxKjWGBekjHX5tAKYyyAH6936FM1S42ajI87EsgWTB4C3xtqEqBQQ==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
 t=1719440694; bh=Gpsvx1+BY4kpIYM+zjPnMT5UO7+aKHUUQRCien/j30o=;
 h=X-Sonic-MF:Date:From:To:Subject:From:Subject;
 b=kZdKxtjRbOWZklqDSdt6W/F+J0HaJDe1C7Bl5WPBiKv/7QpzVdpkD0zVaTozjZoUikiycaNu1sZIWEX1FJvW9yH9TDqrf4W+kQlDiV7W21dRgCzIlhI2zEDqEGu20PIdnd+K8wUdAWXWb5U4TDiqneuFmkhSJQNO8gdWd9zjpFw928rlUw4EY/KDLD9uKyXZbta3zdJVX2sCA4H+gW0OyYrMRQWpwjKkmAMt04yK4/biCMPHMpMUXqzB/L+AM+srBJw1NfTBbDPF8/PdnRDOrbOPh+Al2twBxofrPw9VrJc6at/WTjtyIBDtUR/SQ4TixgwkpFQyUs0PgEqqGbtdZQ==
X-YMail-OSG: c0.J_HAVM1m_ZSyy_vJxaoE0fxxKlShEj3cmkpvYCjC6bykWf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dw.zMLQLjsQ7Ua3vxXiIhViNYTMw.9AJGruXuXY
 9aZYmXTk4VVgYqC1NkyY2esrYGe4aiXQTwRByaz9PtpT1dxn8JFmD.XXJ9me8Q9JJxeq._Wzsevw
 1PhCoQA--
X-Sonic-MF: <spacibba@HIDDEN>
X-Sonic-ID: 7f4984d9-53de-4518-8eea-27b976e4e8e4
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic305.consmr.mail.bf2.yahoo.com with HTTP; Wed, 26 Jun 2024 22:24:54 +0000
Received: by hermes--production-ir2-85cf877599-cnwg7 (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID be2ffa867787b383860766c9644321c8; 
 Wed, 26 Jun 2024 22:24:48 +0000 (UTC)
Date: Thu, 27 Jun 2024 00:24:46 +0200
From: Ergus <spacibba@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71784: 31.0.50; Inconsistent fontification for
 field_identifier in c++-ts-mode
Message-ID: <uhdwl57n7kkbmtifir6q6djqvdqyryvuplocxqweeezmdjn23d@xzu424wx3jb5>
References: <87pls394h0.fsf.ref@HIDDEN> <87pls394h0.fsf@HIDDEN>
 <8634oz9077.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <8634oz9077.fsf@HIDDEN>
X-Mailer: WebService/1.1.22407
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol
Content-Length: 2944
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 71784
Cc: 71784 <at> debbugs.gnu.org, Yuan Fu <casouri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, Jun 26, 2024 at 06:46:04PM GMT, Eli Zaretskii wrote:
>> Date: Wed, 26 Jun 2024 16:13:47 +0200
>> From:  Ergus via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>
>> Using the c++-ts-mode I found that there is some inconsistent
>> fontification for the `fields_identifier`:
>>
>> See the fontification in this example with `emacs -Q`.
>>
>> ```test.cpp
>>
>> std::string key;
>> bool inserted;
>>
>> struct name_t {
>> 	std::string key;
>> 	bool inserted;
>> };
>>
>> name_t keys = {"aaa", true};
>>
>> keys.inserted = false;
>> bool a = keys.inserted;
>> ```
>>
>> 1. The `keys.inserted` values are shown differently before or after the
>> = (the inserted word is fontified is some cases, but not in all)
>>
>> 2. The variable names are fontified differently outside or
>> inside the struct.
>>
>> 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.
>>
>> The inconsistencies 1 and 2 are not only different to c++-mode but they
>> are semantically incorrect.
>
>What does treesit-explore-mode tell you about these instances of
>keys.inserted?

This is the whole explorer buffer for the example code:

(translation_unit
  (declaration
   type: (qualified_identifier scope: (namespace_identifier) :: name: (type_identifier))
   declarator: (identifier) ;)
  (declaration type: (primitive_type) declarator: (identifier) ;)
  (struct_specifier struct name: (type_identifier)
   body: 
    (field_declaration_list {
     (field_declaration
      type: (qualified_identifier scope: (namespace_identifier) :: name: (type_identifier))
      declarator: (field_identifier) ;)
     (field_declaration type: (primitive_type) declarator: (field_identifier) ;)
     }))
  ;
  (declaration type: (type_identifier)
   declarator: 
    (init_declarator declarator: (identifier) =
     value: 
      (initializer_list {
       (string_literal " (string_content) ")
       , (true) }))
   ;)
  (expression_statement
   (assignment_expression
    left: (field_expression argument: (identifier) operator: . field: (field_identifier))
    operator: = right: (false))
   ;)
  (declaration type: (primitive_type)
   declarator: 
    (init_declarator declarator: (identifier) =
     value: (field_expression argument: (identifier) operator: . field: (field_identifier)))
   ;))

The faces are:

1. Inside the struct insert has: font-lock-property-name-face
    It says `declarator: (field_identifier)` and I thin is applying the
    function c-ts-mode--fontify-declarator.

2. In `keys.inserted = false;` the `insert` words has: font-lock-property-use-face
    It says `field: (field_identifier)` and applies (I think) :feature 'property

3. In `bool a = keys.inserted;` is not fontified.
    But it says `field: (field_identifier)` like in 2.


Hope this helps.
Ergus




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71784; Package emacs. Full text available.

Message received at 71784 <at> debbugs.gnu.org:


Received: (at 71784) by debbugs.gnu.org; 26 Jun 2024 15:48:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 26 11:48:26 2024
Received: from localhost ([127.0.0.1]:40127 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sMUsk-0001Rb-8W
	for submit <at> debbugs.gnu.org; Wed, 26 Jun 2024 11:48:26 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51780)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sMUsi-0001RQ-Nv
 for 71784 <at> debbugs.gnu.org; Wed, 26 Jun 2024 11:48:25 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sMUqU-00009q-TT; Wed, 26 Jun 2024 11:46:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=eHhDeHdYUfVQSkYcxdJ41W8eJ+P/2udFsN2Rokv5AHE=; b=CD1Lgqoh40BC
 dXwKvkmvRzWxPdpOucjh/fDiN5ZcLX8UtxvOfKlIdbwoaorgjmWv93D9e2NEXVhTFqjet/MeOT8ms
 2+nM2iH7dhQphivAC7RslSf/pHweXzEG8QMSAG+gIAkPVnTScKc1P5ooHu8z8bO9pj8c/xOg+HmuP
 T7gv4gI1ZsV6L8Xzqt/bAm/JfbxgmEo3kY0Np/rww9HEPj1dqyvRB2Pgrs0aHzNLNkxMPwk7GbcKM
 jm6LZpeccGFhzpvhrw877lBzZL184I89NGZU4U45Ym8uPguwlrHz8VTZLsotNl4RUeIUWgo+nUWFQ
 EE41LU9Hj4kyFM3KgNXHQA==;
Date: Wed, 26 Jun 2024 18:46:04 +0300
Message-Id: <8634oz9077.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ergus <spacibba@HIDDEN>, Yuan Fu <casouri@HIDDEN>
In-Reply-To: <87pls394h0.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#71784: 31.0.50;
 Inconsistent fontification for field_identifier in c++-ts-mode
References: <87pls394h0.fsf.ref@HIDDEN> <87pls394h0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71784
Cc: 71784 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 26 Jun 2024 16:13:47 +0200
> From:  Ergus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> Using the c++-ts-mode I found that there is some inconsistent
> fontification for the `fields_identifier`:
> 
> See the fontification in this example with `emacs -Q`.
> 
> ```test.cpp
> 
> std::string key;
> bool inserted;
> 
> struct name_t {
> 	std::string key;
> 	bool inserted;
> };
> 
> name_t keys = {"aaa", true};
> 
> keys.inserted = false;
> bool a = keys.inserted;
> ```
> 
> 1. The `keys.inserted` values are shown differently before or after the
> = (the inserted word is fontified is some cases, but not in all)
> 
> 2. The variable names are fontified differently outside or
> inside the struct.
> 
> 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.
> 
> The inconsistencies 1 and 2 are not only different to c++-mode but they
> are semantically incorrect.

What does treesit-explore-mode tell you about these instances of
keys.inserted?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71784; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Jun 2024 14:14:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 26 10:14:11 2024
Received: from localhost ([127.0.0.1]:40051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sMTPX-0004Yt-9n
	for submit <at> debbugs.gnu.org; Wed, 26 Jun 2024 10:14:11 -0400
Received: from lists.gnu.org ([209.51.188.17]:53260)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1sMTPV-0004Yl-8u
 for submit <at> debbugs.gnu.org; Wed, 26 Jun 2024 10:14:10 -0400
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 <spacibba@HIDDEN>) id 1sMTPS-0006Gx-KA
 for bug-gnu-emacs@HIDDEN; Wed, 26 Jun 2024 10:14:06 -0400
Received: from sonic307-2.consmr.mail.bf2.yahoo.com ([74.6.134.41])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <spacibba@HIDDEN>) id 1sMTPP-0005nU-RG
 for bug-gnu-emacs@HIDDEN; Wed, 26 Jun 2024 10:14:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1719411238; bh=eNgpao3BvNYDpUbKg5/x/omR+Jg80An8S3kUCRq0KeM=;
 h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To;
 b=FpYcSJBSttqA9S2orm4sCPudLTT06pK5D6I1ZlUJDVoizLqfF9jrZ+VWsnekaYnmErDDOW0KZcaWrdRouLkHHUnmvKDM9h87qKZh3Q6u1xKgLsqsxEifLtSlcv+d9eyScYO5L0k4P1ue1X+vSO+cpogUp9WIjmi9QsdeicOGUouZ96XL1C6d93xsxOUF0SYbayJrUjn0ODw0floG18VO4qpetLsOPC2PfOG+5iag5zTTsCd5rd1rnu2Qlc8Yi1f6NM3xBechWOCAn1c8uCQ2iazkVHfhglL9TebF8U2XFQoS7qZ0jzVgxk7sn6ICMwgXShc0XLolBVijaJmMkYxxQw==
X-SONIC-DKIM-SIGN: v=1; a=rs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yS1dDsWVOJHUqLosnOLDJc1W2My0
 SsfHAiTb7wFLgicVeQOQ0fC_kOl9fk9ALEI9S1riFIxkM9aWEd9F3YTUdzV4Aov_TyOLrKS6VhEm
 SM604cFpPL3O_A3zCmNcXYdqeQ4VgxP9jruXugOzKM0UMhfqCTQokgvmictVfINhkzxWpi1bPtnv
 9lcHJ3gcshHgg4UehoLjbxc7BRHoNIxEqzycrM4dTDLtFjngfGn90jml2CsLdlt5cxQxwA6q4uGo
 aqLyuUFRKWTmK4aJMagvlfp0ifafECsTZhfnO0XLZTK9TN1NJB47tphTdZ4yt2jlSxZn66OWKwbJ
 kYpAPN.tA_FW_TX5wKI2OiwmhC1DoEmyL6QB1cu21BqIOhkQKDM8aRfTj_m8Q7H.OvltNkgcZ6N1
 KkL5_EfIMWJ7vTTfgP6_BP69QsSzBxkucG5OS7cnxnlHIF187akZsbqtWblwlQC8erryA.yywSVf
 Ju_6S_6WI__1XURFHGjWQZiSerchFAvx6SAWaVCzzw26T2XUc7rsQ.qjdYMBoSWvFfiSM5Q2XrLR
 fkg34Ux7oYpFGWiTAyFeMU6UkE7C0vJHLLuTI0jBES2sW1OY4BV1wPmLhNFYKqPIMQGX0sIm7wE5
 nCX3YNaMRivQ-
X-Sonic-MF: <spacibba@HIDDEN>
X-Sonic-ID: fc57918f-bd09-49c8-9d96-50881f19e336
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic307.consmr.mail.bf2.yahoo.com with HTTP; Wed, 26 Jun 2024 14:13:58 +0000
Received: by hermes--production-ir2-85cf877599-cnwg7 (Yahoo Inc. Hermes SMTP
 Server) with ESMTPA ID 61a80c7bff1f35e122fcebadf422d09f; 
 Wed, 26 Jun 2024 14:13:55 +0000 (UTC)
From: Ergus <spacibba@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; Inconsistent fontification for field_identifier in
 c++-ts-mode
X-Debbugs-Cc: 
Date: Wed, 26 Jun 2024 16:13:47 +0200
Message-ID: <87pls394h0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
References: <87pls394h0.fsf.ref@HIDDEN>
X-Mailer: WebService/1.1.22407
 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol
Content-Length: 8669
Received-SPF: pass client-ip=74.6.134.41; envelope-from=spacibba@HIDDEN;
 helo=sonic307-2.consmr.mail.bf2.yahoo.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)


Hi:

Using the c++-ts-mode I found that there is some inconsistent
fontification for the `fields_identifier`:

See the fontification in this example with `emacs -Q`.

```test.cpp

std::string key;
bool inserted;

struct name_t {
	std::string key;
	bool inserted;
};

name_t keys = {"aaa", true};

keys.inserted = false;
bool a = keys.inserted;
```

1. The `keys.inserted` values are shown differently before or after the
= (the inserted word is fontified is some cases, but not in all)

2. The variable names are fontified differently outside or
inside the struct.

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.

The inconsistencies 1 and 2 are not only different to c++-mode but they
are semantically incorrect.

Best,
Ergus


In GNU Emacs 31.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.42, cairo version 1.18.0) of 2024-06-26 built on RTX
Repository revision: d800d6b3bdaa927e031e003e761e623147e812e6
Repository branch: project
System Description: Arch Linux

Configured using:
 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-pgtk
 --with-modules --with-cairo --with-harfbuzz
 --with-native-compilation=aot
 '--program-transform-name=s/^ctags$/ctags.emacs/''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: C++//

Minor modes in effect:
  fancy-compilation-mode: t
  windmove-mode: t
  global-auto-revert-mode: t
  electric-pair-mode: t
  whitespace-mode: t
  flyspell-mode: t
  completion-preview-mode: t
  diff-hl-margin-local-mode: t
  diff-hl-margin-mode: t
  diff-hl-mode: t
  corfu-terminal-mode: t
  global-corfu-mode: t
  corfu-mode: t
  project-multi-mode: t
  gtags-mode: t
  repeat-mode: t
  xterm-mouse-mode: t
  xclip-mode: t
  override-global-mode: t
  winner-mode: t
  save-place-mode: t
  delete-selection-mode: t
  savehist-mode: t
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  which-key-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/mnt/casa/gits/emacs_clones/cuda-mode/cuda-mode hides /home/ergo/.config/emacs/elpa/cuda-mode-20201013.2230/cuda-mode
/mnt/casa/gits/emacs_clones/gtags-mode/gtags-mode hides /home/ergo/.config/emacs/elpa/gtags-mode-1.6/gtags-mode
/home/ergo/.config/emacs/elpa/transient-20240626.947/transient hides /home/ergo/.local/share/emacs/31.0.50/lisp/transient

Features:
(shadow sort mail-extr fancy-compilation compile comint ansi-osc
ansi-color comp-run comp-common emacsbug message mailcap yank-media puny
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-fns radix-tree cl-print debug
backtrace find-func c++-ts-mode c-ts-mode c-ts-common treesit time-date
windmove autorevert filenotify ffap thingatpt url-parse auth-source
eieio eieio-core icons password-cache json map url-vars elec-pair
whitespace flyspell-correct flyspell ispell completion-preview
diff-hl-margin diff-hl-dired citre-lang-fileref dired-x dired
dired-loaddefs diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher
diff-mode track-changes corfu-terminal popon corfu project-multi-mode
gtags-mode cl-macs files-x xref modern-cpp-font-lock cap-words superword
subword citre-lang-c citre-tags citre-ctags citre-readtags
citre-readtags-tables citre-backend-interface citre-common-tag rx
citre-common-util subr-x project cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs term/tmux
term/xterm xterm init repeat cape compat use-package-ensure
use-package-diminish xt-mouse xclip edmacro kmacro byte-opt gv
use-package-bind-key bind-key cl-extra help-mode simple-16-theme winner
ring saveplace delsel savehist easy-mmode display-fill-column-indicator
display-line-numbers diminish which-key cl-seq use-package-core
cl-loaddefs cl-lib bytecomp byte-compile disp-table info
ac-emoji-autoloads ac-haskell-process-autoloads ac-html-autoloads
arduino-cli-mode-autoloads auctex-autoloads tex-site
auto-complete-autoloads avy-zap-autoloads avy-autoloads
better-shell-autoloads caml-autoloads cape-autoloads citre-autoloads
clang-format-autoloads cobol-mode-autoloads compile-multi-autoloads
corfu-terminal-autoloads corfu-autoloads crdt-autoloads
csv-mode-autoloads cuda-mode-autoloads d-mode-autoloads
deadgrep-autoloads debbugs-autoloads diff-hl-autoloads
diminish-autoloads dired-sidebar-autoloads dired-subtree-autoloads
dired-hacks-utils-autoloads dumb-jump-autoloads e2ansi-autoloads
emamux-autoloads esup-autoloads evil-collection-autoloads
annalist-autoloads evil-leader-autoloads evil-autoloads
face-explorer-autoloads fancy-compilation-autoloads flx-autoloads
flycheck-julia-autoloads flycheck-rust-autoloads flycheck-autoloads
flymake-nasm-autoloads flymake-quickdef-autoloads
flyspell-correct-autoloads git-modes-autoloads git-timemachine-autoloads
gnuplot-autoloads google-c-style-autoloads goto-chg-autoloads
groovy-mode-autoloads gtags-mode-autoloads haskell-mode-autoloads
highlight-indent-guides-autoloads i3wm-config-mode-autoloads
ibuffer-sidebar-autoloads iedit-autoloads imenu-list-autoloads
julia-ts-mode-autoloads julia-mode-autoloads languagetool-autoloads
lice-autoloads lorem-ipsum-autoloads lua-mode-autoloads magit-autoloads
git-commit-autoloads magit-section-autoloads markdown-mode-autoloads
modern-cpp-font-lock-autoloads move-dup-autoloads
multiple-cursors-autoloads mutt-mode-autoloads nasm-mode-autoloads
neotree-autoloads nftables-mode-autoloads nginx-mode-autoloads
notmuch-autoloads objed-autoloads opencl-mode-autoloads
paradox-autoloads phi-search-autoloads pkg-info-autoloads epl-autoloads
pkgbuild-mode-autoloads platformio-mode-autoloads async-autoloads
popon-autoloads popup-autoloads projectile-autoloads
projection-autoloads protobuf-mode-autoloads protobuf-ts-mode-autoloads
ptemplate-templates-autoloads ptemplate-autoloads scopeline-autoloads
shell-command+-autoloads slime-autoloads macrostep-autoloads
sphinx-mode-autoloads f-autoloads dash-autoloads s-autoloads
spinner-autoloads ssh-config-mode-autoloads string-inflection-autoloads
sudo-edit-autoloads systemd-autoloads tmux-mode-autoloads
transient-autoloads tsc-autoloads urgrep-autoloads vdiff-autoloads
hydra-autoloads lv-autoloads vterm-toggle-autoloads vterm-autoloads
vundo-autoloads with-editor-autoloads xclip-autoloads
yasnippet-snippets-autoloads yasnippet-autoloads early-init rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win touch-screen pgtk-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty move-toolbar make-network-process native-compile emacs)

Memory information:
((conses 16 227196 51858) (symbols 48 17144 0)
 (strings 32 58441 11185) (string-bytes 1 2123450) (vectors 16 22552)
 (vector-slots 8 264028 8898) (floats 8 109 235) (intervals 56 1774 0)
 (buffers 992 15))




Acknowledgement sent to Ergus <spacibba@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#71784; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 27 Jun 2024 14:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.