From 297d17ace8501b23a32390163676c838dad71f9a Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 30 Jul 2021 12:16:58 +1000 Subject: Remove mentions of "keyword replacement" for SCI_GETPROPERTYEXPANDED, SCI_GETPROPERTYINT, and SCI_SETPROPERTY as this is no longer supported. --- doc/ScintillaDoc.html | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index b38cfb83c..eccf3ee55 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -128,7 +128,7 @@

Scintilla Documentation

-

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.
@@ -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_GETLEXERLANGUAGE(<unused>, char *language NUL-terminated) → int
- 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.

@@ -7916,10 +7916,10 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ without modification; extra spaces at the beginning or end of 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>

@@ -7942,31 +7943,25 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ 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 - SCI_SETPROPERTY 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 SCI_GETPROPERTY + - 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 - SCI_SETPROPERTY 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 - SCI_SETPROPERTY 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