Hi,

I thought of this as well when making the change.
But then decided against it after I tried to compare the mapping in the
SpellCheck plugin against the mappings in Geany and found quite a few
differences. Since I didn't want to evaluate each single style for each
single lexer, I kept the current existing mapping to not break existing
behavior.

While this is not the cleanest way to handle the duplicate mappings, it
is a defense way to not break SpellCheck unnecessarily.

If I find time, maybe I can write some debugging code for me to use the
existing mapping SpellCheck and in parallel use
`!highlighting_is_code_style()` and show me when they disagree.

Regards,
Enrico

On 05/26/2017 01:15 AM, Colomban Wendling wrote:
> Hey,
> 
> Couldn't you use something like `!highlighting_is_code_style()` or
> alike?  Maybe it wasn't part of the API earlier or there's a subtlety I
> didn't think about, but it would seem more robust.
> 
> Cheers,
> Colomban
> 
> Le 25/05/2017 à 09:23, Enrico Tröger a écrit :
>> Branch:      refs/heads/master
>> Author:      Enrico Tröger <enrico.troe...@uvena.de>
>> Committer:   Enrico Tröger <enrico.troe...@uvena.de>
>> Date:        Thu, 25 May 2017 16:23:38 UTC
>> Commit:      9fe302801be4ac87e86a7533385c10bfbd5876a9
>>              
>> https://github.com/geany/geany-plugins/commit/9fe302801be4ac87e86a7533385c10bfbd5876a9
>>
>> Log Message:
>> -----------
>> Add missing style mappings for Rust and PHPSCRIPT
>>
>>
>> Modified Paths:
>> --------------
>>     spellcheck/src/speller.c
>>
>> Modified: spellcheck/src/speller.c
>> 21 lines changed, 21 insertions(+), 0 deletions(-)
>> ===================================================================
>> @@ -889,6 +889,7 @@ gboolean sc_speller_is_text(GeanyDocument *doc, gint pos)
>>                      break;
>>              }
>>              case SCLEX_HTML:
>> +            case SCLEX_PHPSCRIPT:
>>              case SCLEX_XML:
>>              {
>>                      switch (style)
>> @@ -1145,6 +1146,26 @@ gboolean sc_speller_is_text(GeanyDocument *doc, gint 
>> pos)
>>                      }
>>                      break;
>>              }
>> +            case SCLEX_RUST:
>> +            {
>> +                    switch (style)
>> +                    {
>> +                            case SCE_RUST_DEFAULT:
>> +                            case SCE_RUST_COMMENTBLOCK:
>> +                            case SCE_RUST_COMMENTBLOCKDOC:
>> +                            case SCE_RUST_COMMENTLINE:
>> +                            case SCE_RUST_COMMENTLINEDOC:
>> +                            case SCE_RUST_STRING:
>> +                            case SCE_RUST_STRINGR:
>> +                            case SCE_RUST_BYTESTRING:
>> +                            case SCE_RUST_BYTESTRINGR:
>> +                            case SCE_RUST_LEXERROR:
>> +                                    return TRUE;
>> +                            default:
>> +                                    return FALSE;
>> +                    }
>> +                    break;
>> +            }
>>              case SCLEX_SQL:
>>              {
>>                      switch (style)
>>
>>
>>
>> --------------
>> This E-Mail was brought to you by github_commit_mail.py (Source: 
>> https://github.com/geany/infrastructure).
>> _______________________________________________
>> Plugins-Commits mailing list
>> plugins-comm...@lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/plugins-commits

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel

Reply via email to