bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71070: 30.0.50; c++-ts-mode namespace wrong fontification.


From: Ergus
Subject: bug#71070: 30.0.50; c++-ts-mode namespace wrong fontification.
Date: Sun, 19 May 2024 21:00:42 +0200

On Sun, May 19, 2024 at 09:36:07PM GMT, Eli Zaretskii wrote:
Date: Sun, 19 May 2024 20:14:19 +0200
From:  Ergus via "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>


Following up the conversation in the develops mailing list I will report
this issue still happening:

In c++-ts-mode, the namespaces are not fontified like in c++-mode

(i.e in std::string the `std` used to have font-lock-constant-face while
`string` used to have font-lock-type-face).

Why do you think std should be in font-lock-constant-face?  The name
of a namespace is not a constant, it's an identifier.

Hi Eli:

That's how namespaces are fontified in the c++-mode. Not telling it is
correct, wrong or if needs improvement; just that c++-ts-mode is not
doing in the same way.

Try this:

```main.cpp

const std::string a;

class myclass {
        std::time::timespec var;
};

int main()
{
        std::string b = 1;

        
}
```

and then M-x c++-ts-mode you will see the difference.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]