From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71784: 31.0.50; Inconsistent fontification for field_identifier in c++-ts-mode Date: Wed, 26 Jun 2024 18:46:04 +0300 Message-ID: <8634oz9077.fsf@gnu.org> References: <87pls394h0.fsf.ref@aol.com> <87pls394h0.fsf@aol.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1199"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71784@debbugs.gnu.org To: Ergus , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 26 17:49:33 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 1sMUtp-00005v-2h for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jun 2024 17:49:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMUtP-0006pf-Jp; Wed, 26 Jun 2024 11:49:08 -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 1sMUtJ-0006el-Ol for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2024 11:49:03 -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 1sMUtJ-0000QH-Ek for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2024 11:49:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sMUtL-0001Sw-AP for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2024 11:49:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jun 2024 15:49:03 +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.17194169065560 (code B ref 71784); Wed, 26 Jun 2024 15:49:03 +0000 Original-Received: (at 71784) by debbugs.gnu.org; 26 Jun 2024 15:48:26 +0000 Original-Received: from localhost ([127.0.0.1]:40127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMUsk-0001Rb-8W for submit@debbugs.gnu.org; Wed, 26 Jun 2024 11:48:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMUsi-0001RQ-Nv for 71784@debbugs.gnu.org; Wed, 26 Jun 2024 11:48:25 -0400 Original-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 ) 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==; In-Reply-To: <87pls394h0.fsf@aol.com> (bug-gnu-emacs@gnu.org) 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:287952 Archived-At: > Date: Wed, 26 Jun 2024 16:13:47 +0200 > From: Ergus via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > 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?