bug#63322: CC Mode 5.35.2 (C/*l); Various problems fontifying sfnt.c
Po Lu via CC-Mode-help <[email protected]> Fri, 12 May 2023 11:18:07 +0800
| Newsgroups | gmane.emacs.cc-mode.general |
|---|---|
| Message-ID | <[email protected]> |
Alan Mackenzie <[email protected]> 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.