From 297d17ace8501b23a32390163676c838dad71f9a Mon Sep 17 00:00:00 2001
From: Neil Last edited 29 July 2021 NH Last edited 30 July 2021 NH Scintilla 5 has moved the lexers from Scintilla into a new
Lexilla project. SCI_GETLEXERLANGUAGE(<unused>, char *language NUL-terminated) → intScintilla Documentation
-
@@ -7869,7 +7869,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
in SciLexer.h. Some lexers may not have a lexer ID, just a lexer name in which case 0 is returned.
- SCI_GETLEXERLANGUAGEreturns the name of the current lexer which must be set with SCI_SETILEXER.
+ SCI_GETLEXERLANGUAGE returns the name of the current lexer which must be set with SCI_SETILEXER.
To locate the name for a lexer, open the relevant
lexilla/lexers/Lex*.cxx file and search for LexerModule. The third argument in the
LexerModule constructor is the name to use.key are
significant.
The value string can refer to other keywords. For example,
- SCI_SETPROPERTY("foldTimes10", "$(fold)0") stores the string
- "$(fold)0", but when this is accessed, the $(fold) is replaced by the
- value of the "fold" keyword (or by nothing if this keyword does not exist).
The value string can no longer refer to other keywords
+ as was possible in older releases of Scintilla.
Lexers may only store values for keywords they support.
Currently the "fold" property is defined for most of the lexers to set the fold structure if
set to "1". SCLEX_PYTHON understands "tab.timmy.whinge.level" as a
@@ -7932,8 +7932,9 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
lexer or start with "lexer." or "fold." if they apply to multiple lexers.
Applications may discover the set of properties used by searching the source code of lexers for lines that contain
- GetProperty and a double quoted string and extract the value of the double quoted string as the property name.
- The scintilla/scripts/LexGen.py script does this and can be used as an example.
+ GetProperty or DefineProperty and a double quoted string and extract the value of
+ the double quoted string as the property name.
+ The lexilla/scripts/LexillaData.py script does this and can be used as an example.
Documentation for the property may be located above the call as a multi-line comment starting with
// property <property-name>
Note that "keyword replacement" as described in will not be performed.
-If the value argument is 0 then the length that should be allocated to store the value is returned; again, the terminating 0 is not included.
SCI_GETPROPERTYEXPANDED(const char *key, char *value) → int
- Lookup a keyword:value pair using the specified key; if found, copy the value to the user-supplied
+ This is now the same as
+ - no expansion is performed.
Lookup a keyword:value pair using the specified key; if found, copy the value to the user-supplied buffer and return the length (not including the terminating 0). If not found, copy an empty string to the buffer and return 0.
-Note that "keyword replacement" as described in will be performed.
- -If the value argument is 0 then the length that should be allocated to store the value (including any indicated keyword replacement) - is returned; again, the terminating 0 is not included.
+If the value argument is 0 then the length that should be allocated to store the value is returned; + again, the terminating 0 is not included.
SCI_GETPROPERTYINT(const char *key, int defaultValue) → int
Lookup a keyword:value pair using the specified key; if found, interpret the value as an integer and return it.
If not found (or the value is an empty string) then return the supplied default. If the keyword:value pair is found but is not
a number, then return 0.
Note that "keyword replacement" as described in will be performed before any numeric interpretation.
-SCI_SETKEYWORDS(int keyWordSet, const char *keyWords)
You can set up to 9 lists of keywords for use by the current lexer.
keyWordSet can be 0 to 8 (actually 0 to KEYWORDSET_MAX)
--
cgit v1.2.3