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 #11 received at 59904 <at> debbugs.gnu.org (full text, mbox):

From: Theodor Thornhill <theo <at> thornhill.no>
To: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>, Yuan Fu
 <casouri <at> gmail.com>, 59904 <at> debbugs.gnu.org
Subject: Re: 29.0.60; js-ts-mode does not fontify method-call to
 object-instances using font-lock-function-name
Date: Thu, 08 Dec 2022 16:02:26 +0100
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




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.