GNU bug report logs - #63322
CC Mode 5.35.2 (C/*l); Various problems fontifying sfnt.c

Previous Next

Package: cc-mode;

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

Date: Sat, 6 May 2023 08:12:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 63322 <at> debbugs.gnu.org
Subject: bug#63322: CC Mode 5.35.2 (C/*l); Various problems fontifying sfnt.c
Date: Fri, 12 May 2023 11:18:07 +0800
Alan Mackenzie <acm <at> muc.de> writes:

> Hello, Po.
>
> Thanks for the bug report.
>
> On Sat, May 06, 2023 at 16:11:25 +0800, Po Lu via CC-Mode-help wrote:
>> Package: cc-mode
>
>> Go to src/sfnt.c in the feature/android branch of Emacs.
>> Type M-s o ^sfnt RET, then visit each of the following function
>> definitions:
>
>> sfnt_scale_by_freedom_vector
>> sfnt_interpret_iup_1
>> sfnt_interpret_font_program
>> sfnt_interpret_control_value_program
>> sfnt_interpret_simple_glyph
>> sfnt_interpret_compound_glyph
>
>> In each of these definitions, the identifier name is not fontified as a
>> function!
>
> Yes.  There were actually two distinct problems here, one trivial to
> solve and the other difficult.
>
> For most of these function names, you just need to add the macro name
> "TEST_STATIC" to c-noise-macro-names, as is done in .dir-locals for some
> other names, and is explained fully in the chapter "Noise Macros" in the
> CC Mode manual.
>
> For the other two function names, the problem was that they followed a
> large chunk of CPP macros, bigger than a search limit for one of CC
> Mode's backward searches.  The fix was to check for this possibility and
> handle it.
>
> Would you please do the usual with the enclosed patch (which should
> apply cleanly to both the emacs-29 branch and master), and let me know
> how well it works.  Thanks!

It works, thanks.




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

Previous Next


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