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#71070: 30.0.50; c++-ts-mode namespace wrong fontification. Date: Sun, 19 May 2024 22:13:45 +0300 Message-ID: <86v839aa3a.fsf@gnu.org> References: <87h6et6550.fsf.ref@aol.com> <87h6et6550.fsf@aol.com> <86wmnpabu0.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 71070@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 19 21:14:27 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 1s8lzG-00025W-Fo for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 May 2024 21:14:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8lyq-0003R6-OU; Sun, 19 May 2024 15:14:00 -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 1s8lyo-0003Qj-Ux for bug-gnu-emacs@gnu.org; Sun, 19 May 2024 15:13:59 -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 1s8lyo-00071f-MT for bug-gnu-emacs@gnu.org; Sun, 19 May 2024 15:13:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8lys-0005CL-II for bug-gnu-emacs@gnu.org; Sun, 19 May 2024 15:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 May 2024 19:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71070 X-GNU-PR-Package: emacs Original-Received: via spool by 71070-submit@debbugs.gnu.org id=B71070.171614604119968 (code B ref 71070); Sun, 19 May 2024 19:14:02 +0000 Original-Received: (at 71070) by debbugs.gnu.org; 19 May 2024 19:14:01 +0000 Original-Received: from localhost ([127.0.0.1]:37598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8lyr-0005C0-6Z for submit@debbugs.gnu.org; Sun, 19 May 2024 15:14:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8lyo-0005Bo-KJ for 71070@debbugs.gnu.org; Sun, 19 May 2024 15:13:59 -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 1s8lyd-00070y-VL; Sun, 19 May 2024 15:13:48 -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=JEf6Yg71aibx0hq+8+c51iAGlYDB0SUINLbgSKZmQkw=; b=C+k5S45NwBLq 9Pz17M1M4UlU27CtSTbKe6OhwWZGZeBwtgcZ6Myin0s3KzJiOsuXnbJFJ/Uk5gO72cids7+RrCgDV UITXKlyV10z0i+rWe74RXR1Ijma9X7SIWlAqWyxG56TCR9DBWDzvxXIW/ZB0MveWEoueDAYtI6yj2 Gh9Wy1UMg7/+4XyDorhXjpnEdaNbCbLgvT4CzaAhP8X42dhhzHL+VAELFDHQ1gBuyrCxmlRZS8orJ hRWOoAOjq3PUi5Q8nFu2Sm3V9V0QDTc+u+wY7KSodbdRtnusdMIKvf/C5nmLfA6+2An92H5SAxDmP AAAn94h/pgE+wEraKkAqDg==; In-Reply-To: (message from Ergus on Sun, 19 May 2024 21:00:42 +0200) 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:285448 Archived-At: > Date: Sun, 19 May 2024 21:00:42 +0200 > From: Ergus > Cc: Yuan Fu , 71070@debbugs.gnu.org > > >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. 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?