[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59953: 28.2; c type modifiers only work as prefixes for font-lock, c
From: |
Alan Mackenzie |
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 |
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).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#59953: 28.2; c type modifiers only work as prefixes for font-lock, cc-mode,
Alan Mackenzie <=