diff options
| -rw-r--r-- | doc/ScintillaDoc.html | 3 | ||||
| -rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
| -rw-r--r-- | src/Catalogue.cxx | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index fa247b35e..d6d98b578 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -6830,6 +6830,9 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ styling and fold points for an unsupported language you can either do this in the container or better still, write your own lexer following the pattern of one of the existing ones.</p> + <p>If the symbol <code>SCI_EMPTYCATALOGUE</code> is defined when building + Scintilla, then no lexers are made available but other lexing support code may be present.</p> + <p>Scintilla also supports external lexers. These are DLLs (on Windows), .dylib modules (on macOS), or .so modules (on GTK/Linux) that export three functions: <code>GetLexerCount</code>, <code>GetLexerName</code>, and diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index ea72b9ecb..308c1d40c 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -563,6 +563,9 @@ <li> SCI_LOADLEXERLIBRARY implemented on Cocoa. </li> + <li> + Build Scintilla with SCI_EMPTYCATALOGUE to avoid making lexers available. + </li> </ul> <h3> <a href="https://sourceforge.net/projects/scintilla/files/scintilla/3.11.2/scintilla3112.zip/download">Release 3.11.2</a> diff --git a/src/Catalogue.cxx b/src/Catalogue.cxx index 919ecf668..9e0ab2921 100644 --- a/src/Catalogue.cxx +++ b/src/Catalogue.cxx @@ -53,6 +53,8 @@ int Scintilla_LinkLexers() { return 0; initialised = 1; +#if !defined(SCI_EMPTYCATALOGUE) + // Shorten the code that declares a lexer and ensures it is linked in by calling a method. #define LINK_LEXER(lexer) extern LexerModule lexer; catalogueDefault.AddLexerModule(&lexer); @@ -189,5 +191,7 @@ int Scintilla_LinkLexers() { //--Autogenerated -- end of automatically generated section +#endif + return 1; } |
