[Geany-devel] Highlighting setup refactoring?
Colomban Wendling
lists.ban at xxxxx
Fri Nov 11 23:24:22 UTC 2011
Le 10/11/2011 04:16, Matthew Brush a écrit :
> 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.
You mean SCLEX_FOO? If yes, I did it already .
> 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 :)
Yeah I know, it's the one thing I though some maybe wouldn't like. I
just dropped one no more useful macro indirection, so it's a *little*
better, but will still be cryptic if one sets lexer_FOO to
EMPTY_PROPERTIES (:-').
The question is: is the improvement worth the magic macro? I think yes,
but I want(ed) you opinion.
> The third comment is just a reminder[2] to update the HACKING file for
> the information about adding filetypes.
Yeah I know, will do :)
So, is anybody against me merging it after making the last few
adjustments (like doc update)?
Another question is whether I should keep the highlightingmappings.h
file as-is, or rename it (to what?)/merge it back in highlighting.c?
Cheers,
Colomban
More information about the Devel
mailing list