GNU bug report logs - #63224
CC Mode 5.35.2 (C/*l); ``extern foo ()'' not fontified correctly

Previous Next

Package: cc-mode;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Tue, 2 May 2023 07:33:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 63224 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 63224 <at> debbugs.gnu.org
Subject: Re: bug#63224: CC Mode 5.35.2 (C/*l); ``extern foo ()'' not
 fontified correctly
Date: Tue, 2 May 2023 17:24:30 +0000
[Message part 1 (text/plain, inline)]
Hello, Po.

Thanks for the high quality bug report.

On Tue, May 02, 2023 at 15:31:51 +0800, Po Lu via CC-Mode-help wrote:
> Package: cc-mode

> Insert:

> main ()
> {
>   extern foo ();

>   foo ("hello world!\n");
> }

> in a C Mode buffer.  Notice that the identifier in the declarator of
> `foo' is not fontified as a function.

> Emacs  : GNU Emacs 29.0.90 (build 1, x86_64-pc-linux-gnu)
>  of 2023-04-29
> Package: CC Mode 5.35.2 (C/*l)
> Buffer Style: gnu
> c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties category-properties 1-bit)

[ .... ]

This was a special case which wasn't being handled.

Would you please try the attached patch on your real C code, and let me
know how well it works.  It should apply cleanly to either the emacs-29
branch or the trunk.

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).

[diff.20230502.diff (text/plain, attachment)]

This bug report was last modified 2 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.