GNU bug report logs -
#58537
CC Mode 5.35.1 (C/*l); Keywords being fontified as types at random
Previous Next
Reported by: Po Lu <luangruo <at> yahoo.com>
Date: Sat, 15 Oct 2022 03:44:01 UTC
Severity: normal
Merged with 58539
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 58537 <at> debbugs.gnu.org (full text, mbox):
Alan Mackenzie <acm <at> muc.de> writes:
> Hello, Po.
>
> On Mon, Oct 17, 2022 at 14:24:59 +0800, Po Lu wrote:
>> Alan Mackenzie <acm <at> muc.de> writes:
>
> [ .... ]
>
>> BTW, there is still another case that isn't fixed: place the following
>> text in a C mode buffer:
>
>> {
>> Data *tem;
>
>> for (tem = surface->items; tem; tem = tem->next)
>> {
>> if (tem->type == tem)
>> return tem;
>> }
>
>> /* Next, allocate some new client data. */
>
>> test->a = b;
>> }
>
>> and move point to the line above "test->a = b", and type
>
>> TAB t e m SPC = SPC foo ;
>
>> "tem" will become fontified as a type, and will also be stuck that way.
>
> Thanks for taking the trouble to report this.
>
> The problem is C Mode prematurely recognising tem in "tem \n test" as a
> type, since there are two adjacent identifiers.
>
> Please try out the following patch (which also includes yesterday's
> change). It also aims to solve the same problem when instead of
>
> test->a = b;
>
> there is
>
> test (foo);
>
> ..
>
>> Thanks.
>
> Does this patch, together with that for bug #58534 also solve #58539, or
> is that still giving trouble?
Could you please send it as an attachment instead? Thanks.
This bug report was last modified 2 years and 245 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.