GNU bug report logs - #59070
CC Mode 5.35.1 (C/*l); Failure to completely fontify struct type

Previous Next

Package: cc-mode;

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

Date: Sun, 6 Nov 2022 07:57:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Po Lu <luangruo <at> yahoo.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 59070 <at> debbugs.gnu.org
Subject: Re: bug#59070: CC Mode 5.35.1 (C/*l); Failure to completely fontify
 struct type
Date: Thu, 10 Nov 2022 10:54:23 +0800
Alan Mackenzie <acm <at> muc.de> writes:

> Hello, Po.
>
> On Sun, Nov 06, 2022 at 15:56:15 +0800, Po Lu via CC-Mode-help wrote:
>> Package: cc-mode
>
>> Start with the following text in a c-mode buffer:
>
>> static const struct test_seat_controller_interface seat_controller_impl =
>>   {
>>     .destroy = DestroyTestSeatController,
>>     .bind_seat = BindSeat,
>>     .get_XIModifierState = GetXIModifierState,
>>     .get_XIButtonState = GetXIButtonState,
>>     .get_XIValuatorState = GetXIValuatorState,
>>     .dispatch_XI_Enter = DispatchXIEnter,
>>     .dispatch_XI_Leave = DispatchXILeave,
>>     .dispatch_XI_Motion = DispatchXIMotion,
>>     .dispatch_XI_ButtonPress = DispatchXIButtonPress,
>>     .dispatch_XI_ButtonRelease = DispatchXIButtonRelease,
>>   };
>
>> move point to the end of the line reading ".dispatch_XI_ButtonPress =
>> DispatchXIButtonRelease", and then type RET.  At that point,
>> "test_seat_controller_interface" will no longer be completely fontified
>> as a type.
>
> Yes.  The position inside that identifier where the fontification
> stopped was exactly 500 characters back from the start of the new line.
> This made it easy to locate a 500 in the Lisp source causing it.  It
> turned out to be an off-by-one error.
>
> Would you please apply the attached patch, and confirm the bug is fixed
> (or say what's still wrong).
>
> Thanks!
>
>> Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu)
>>  of 2022-10-29
>> Package: CC Mode 5.35.1 (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)
>
> [ .... ]

That seems to work here, thanks.




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

Previous Next


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