GNU bug report logs - #59897
29.0.60; csharp-ts-mode: variable-name fontified as method when invoking method with generic type-argument.

Previous Next

Package: emacs;

Reported by: jostein <at> kjonigsen.net

Date: Thu, 8 Dec 2022 09:30:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.60

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: Theodor Thornhill <theo <at> thornhill.no>, Jostein Kjønigsen <jostein <at> kjonigsen.net>
Cc: casouri <at> gmail.com, 59897 <at> debbugs.gnu.org
Subject: bug#59897: 29.0.60; csharp-ts-mode: variable-name fontified as method when invoking method with generic type-argument.
Date: Thu, 8 Dec 2022 11:52:53 +0100
On 08.12.2022 11:12, Theodor Thornhill wrote:
> Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> writes:
>
>> When I use the new csharp-ts-mode, method fontification is usually accurate with only 1 exception which I have
>> encountered so far:
>>
>> When calling methods on objects, and that method accepts a generic type-argument. You typically see this in
>> Startup.cs-like files in ASP.Net Core projects:
>>
>> services.AddSomeExtensionWithoutTypeArguments();
>> services.AddSomeExtensionWithTypeArguments<MyType>();
>>
>> In the above cases we see that fontification of "services" differs.
>>
>> For the first line, services is fontified using font-lock-variable-name-face (correct), but in the latter case services
>> is fontified using font-lock-function-name-face (incorrect).
>>
>> In both cases I expected services to be fontified using font-lock-variable-name-face.
>>
> Can you test this patch, Jostein, and if you're happy, please install,
> Yuan :-)

I beat you by 3 minutes, but I'll be a gentleman and test none the less :D

You test mine, and we can see which one we prefer?
> BTW, I think the ruleset is getting pretty gnarly in csharp-mode, so
> maybe we should consider slimming it down a little (without losing
> granularity) for perf reasons down the line!
>
> Theo

It's getting somewhat intricate, agreed. It's IMO not entirely obvious 
what the different rules are for or what cases they are meant to support.

In that regard, I miss our old test-suite from github's csharp-mode. It 
was a nice safety-net when making changes like this.

--
Jostein





This bug report was last modified 2 years and 215 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.