From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#59953: 28.2; c type modifiers only work as prefixes for font-lock, cc-mode Date: Fri, 24 Nov 2023 12:29:46 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59953-done@debbugs.gnu.org, acm@muc.de To: Chris Hecker Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 24 13:31:16 2023 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 1r6VL2-0005mF-G0 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Nov 2023 13:31:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6VKn-0003IL-AA; Fri, 24 Nov 2023 07:31:01 -0500 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 1r6VKj-0003HW-UP for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 07:30:57 -0500 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 1r6VKj-0000KE-Ku for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 07:30:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6VKo-0002sW-1t for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 07:31:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Nov 2023 12:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 59953 X-GNU-PR-Package: emacs Mail-Followup-To: 59953@debbugs.gnu.org, acm@muc.de, checker@d6.com Original-Received: via spool by 59953-done@debbugs.gnu.org id=D59953.17008290031147 (code D ref 59953); Fri, 24 Nov 2023 12:31:01 +0000 Original-Received: (at 59953-done) by debbugs.gnu.org; 24 Nov 2023 12:30:03 +0000 Original-Received: from localhost ([127.0.0.1]:35816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6VJq-0000Hl-Dc for submit@debbugs.gnu.org; Fri, 24 Nov 2023 07:30:03 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:56183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6VJm-0000H5-FQ for 59953-done@debbugs.gnu.org; Fri, 24 Nov 2023 07:30:01 -0500 Original-Received: (qmail 85590 invoked by uid 3782); 24 Nov 2023 13:29:47 +0100 Original-Received: from acm.muc.de (pd953a757.dip0.t-ipconnect.de [217.83.167.87]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 24 Nov 2023 13:29:47 +0100 Original-Received: (qmail 7002 invoked by uid 1000); 24 Nov 2023 12:29:46 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:274857 Archived-At: Hello, Chris. I've committed the patch, and I'm closing the bug with this post. On Sat, Oct 14, 2023 at 15:52:34 +0000, Alan Mackenzie wrote: > Thanks for taking the trouble to file this bug, but sorry it's been such > a long time without a response. > I've now looked at the bug and it wasn't that difficult to patch. If you > don't mind too much, I'll put your test file into the CC Mode test suite, > having added one line ("long int unsigned Three;") to it. > Would you please now apply the attached patch to your current Emacs (the > file cc-engine.el is in lisp/progmodes), byte compile cc-engine.el (or > just the whole of CC Mode), load the result into your Emacs and try it > out on your real source code. Then please confirm to me that the bug is > fixed, or tell me what's still not right. Thanks! (If you want any help > in the patching of byte compilation, feel free to send me private email.) > On Sat, Dec 10, 2022 at 22:31:18 +0000, Chris Hecker wrote: > > cc-mode doesn't seem to recognize that c type specifiers can come in > > any order (and I prefer them after so they're modifying the base type), > > so the highlighting doesn't work right for the variable name. Here's > > an example in a struct, works the same way in a function: > > struct foo { > > unsigned int One; > > int unsigned Two; > > }; > > emacs -Q results: > > [cid:emf20eaa32-35e0-4df0-a1fb-4e6ad9397939@checker-blade15] > > I couldn't see an easy way of fixing this (besides just adding all the > > combos to *-font-lock-extra-types). Seems like there needs to be a > > c-primitive-type-postfix-kwds variable to do this right? > > Thanks, > > Chris > > In GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) > >  of 2022-09-13 built on AVALON > > Windowing system distributor 'Microsoft Corp.', version 10.0.19044 > > System Description: Microsoft Windows 10 Home (v10.0.2009.19044.2251) > > Configured using: > >  'configure --with-modules --without-dbus --with-native-compilation > >  --without-compress-install CFLAGS=-O2' > > Configured features: [ .... ] -- Alan Mackenzie (Nuremberg, Germany).