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

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Wed, 26 Jun 2024 14:15:02 UTC

Severity: normal

Tags: wontfix

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ergus <spacibba <at> aol.com>, Yuan Fu <casouri <at> gmail.com>
Cc: 71784 <at> debbugs.gnu.org
Subject: bug#71784: 31.0.50; Inconsistent fontification for field_identifier in c++-ts-mode
Date: Wed, 26 Jun 2024 18:46:04 +0300
> 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 <at> gnu.org>
> 
> 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 bug report was last modified 1 year and 4 days ago.

Previous Next


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