[Geany-devel] Highlighting setup refactoring?

Matthew Brush mbrush at xxxxx
Thu Nov 10 03:16:06 UTC 2011


On 11/08/2011 02:55 PM, Colomban Wendling wrote:
> [...]
>
> Anyway, I'd like your opinion on this, what to improve, what you feel
> good and bad about.
>

Ok, now that I have tried it and hacked it a little, I'd say it's quite 
a bit easier to follow and seems to work well with my minimal testing.

Just a few comments to make after playing with it a little.

The first is that it would be better to move the use of filetype lexer 
ids[1] in highlighting.c highlighting_init_styles() and 
highlighting_set_styles() into highlightingmappings.h.  I'm not sure if 
it's possible, but it would make adding filetypes more straightforward 
since you wouldn't need to touch highlighting.c at all anymore.

The second comment is that use of all those cpp macros makes it a little 
confusing when getting errors/warnings from the compiler.  I guess it's 
unavoidable, but I thought I'd mention it since it caused me a little 
trouble :)

The third comment is just a reminder[2] to update the HACKING file for 
the information about adding filetypes.

Cheers,
Matthew Brush

[1] Is this the same as the SciLexer.h constants?
[2] You probably just didn't get to doing this yet



More information about the Devel mailing list