GNU bug report logs - #59904
29.0.60; js-ts-mode does not fontify method-call to object-instances using font-lock-function-name

Previous Next

Package: emacs;

Reported by: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>

Date: Thu, 8 Dec 2022 13:58:01 UTC

Severity: normal

Found in version 29.0.60

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

Bug is archived. No further changes may be made.

Full log


Message #16 received at 59904-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 59904-done <at> debbugs.gnu.org,
 Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
Subject: Re: bug#59904: 29.0.60; js-ts-mode does not fontify method-call to 
 object-instances using font-lock-function-name
Date: Fri, 9 Dec 2022 12:53:28 -0800
Theodor Thornhill <theo <at> thornhill.no> writes:

> Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> writes:
>
>> Looking into the code, a minimal code-repro looks like this:
>>
>> someObject.someMethod();
>>
>> Activating treesit-explore-mode on that, yields the following tree:
>>
>> (expression_statement
>>   (call_expression
>>    function: (member_expression object: (identifier) . property: 
>> (property_identifier))
>>    arguments: (arguments ( )))
>>   ;)
>>
>> Now looking in js.el I see the following which looks like it's trying to 
>> fontify this, but for some reason it's not working:
>>
>>       (call_expression
>>        function: [(identifier) @font-lock-function-name-face
>>                   (member_expression
>>                    property:
>>                    (property_identifier) @font-lock-function-name-face)])
>>
>> I'm guessing this fontification is being overridden further down (just 
>> like for csharp-ts-mode). From what I can tell, reversing the order of 
>> declarations seems to fix this for me.
>>
>
> Yeah this is probably correct.  Looks good to me.  Yuan, want to apply?
> :-)
>
> Theo

Applied, thanks! I added a comment so we don’t accidentally reintroduce
this later.

Yuan




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

Previous Next


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