This patch allows external lexers to supply stylers that correspond to themes.
It looks for a tag inside of LexerType called ThemeStyles and within ThemeStyles are a list of Theme tags with the name attribute being the theme name. Inside each Theme tag is a list of WordStyles, exactly as they appear within LexerType. The default no-theme styles will stay where they are inside LexerType.
Why is this necessary?
This allows an external lexer plugin developer to assign styles for their lexers that get activated when a user changes theme. The user can also edit the themes for an external lexer that correspond to a new theme and will create the necessary xml tags, allowing for complete backwards-compatibility.
I've attached a sample xml from my GmodLua plugin, though the styles are just duplicates of the default style. Also, this can be tested with any pre-existing lexer plugin.