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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 20 May 2024 14:11:21 +0300

> Date: Sun, 19 May 2024 23:36:41 +0200
> From: Ergus <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> On Sun, May 19, 2024 at 10:13:45PM GMT, Eli Zaretskii wrote:
> >No one said that what c++-mode does is necessarily correct.  maybe it
> >is, maybe it isn't.
> >
> >How do other C++ IDEs fontify namespace names?
> 
> Hi Eli:
> 
> Every editor-ide has its own approach for this. But emacs has it own
> flavor and the ts-* intention was to keep it as close as possible to the
> status-quo; that's why I am reporting it here.
> 
> There are many details missing in the c/c++-ts-mode compared to
> c-mode... but I understand that some of them are WIP while others are
> just too complex to port.

I understand all that, but still: can you (or someone else) answer my
question about the accepted practices of IDEs in this matter: do they
highlight the namespace identifiers differently than other
identifiers, or do they use the same highlighting?

It is IMO important to know what are the accepted practices, to deal
with this issue in a proper perspective.

> My main concern here is that this seemed like a simple issue considering
> that treesitter recognizes the namespace correctly. But the Yuan's fix
> didn't work; so maybe there is a detail we are missing here, or that
> needs extra documentation? Or in the worst case some detail/issue broken
> in the ts api?

I don't know.  In particular, I don't know what specific aspects of
this did Yuan try to fix.  Yuan is CC'ed and will hopefully chime in
and answer these questions.  Meanwhile we should make up our minds
regarding the desired behavior, which is mostly independent of what
Yuan tried to do and even of what c++-mode does.

Thanks.