aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/KeyWords.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx
index decbac2b8..8a03aa8ac 100644
--- a/src/KeyWords.cxx
+++ b/src/KeyWords.cxx
@@ -129,14 +129,16 @@ int wxForceScintillaLexers(void) {
return Scintilla_LinkLexers();
}
-// Shorten the code that declares a lexer and ensures it is linked in by calling a method.
-#define LINK_LEXER(lexer) extern LexerModule lexer; lexer.GetLanguage();
-
// To add or remove a lexer, add or remove its file and run LexGen.py.
// Force a reference to all of the Scintilla lexers so that the linker will
// not remove the code of the lexers.
int Scintilla_LinkLexers() {
+ static int forcer = 0;
+
+// Shorten the code that declares a lexer and ensures it is linked in by calling a method.
+#define LINK_LEXER(lexer) extern LexerModule lexer; forcer += lexer.GetLanguage();
+
//++Autogenerated -- run src/LexGen.py to regenerate
//**\(\tLINK_LEXER(\*);\n\)
LINK_LEXER(lmAda);