From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#59977: 29.0.60; python-ts-mode does not fontify function-invocations using font-lock-function-name [PATCH] Date: Thu, 15 Dec 2022 17:35:37 -0800 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30475"; mail-complaints-to="usenet@ciao.gmane.io" Cc: fgallina@gnu.org, 59977@debbugs.gnu.org, theo@thornhill.no To: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 16 02:36:22 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5zeA-0007ZQ-M2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Dec 2022 02:36:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5zds-0004Xf-FA; Thu, 15 Dec 2022 20:36:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5zdr-0004XW-0g for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 20:36:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5zdq-0006SO-N2 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 20:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5zdq-00078H-2S for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 20:36:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Dec 2022 01:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59977 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59977-submit@debbugs.gnu.org id=B59977.167115455027407 (code B ref 59977); Fri, 16 Dec 2022 01:36:02 +0000 Original-Received: (at 59977) by debbugs.gnu.org; 16 Dec 2022 01:35:50 +0000 Original-Received: from localhost ([127.0.0.1]:46100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5zde-00077z-Ci for submit@debbugs.gnu.org; Thu, 15 Dec 2022 20:35:50 -0500 Original-Received: from mail-pj1-f50.google.com ([209.85.216.50]:34707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5zdY-00077k-Oa for 59977@debbugs.gnu.org; Thu, 15 Dec 2022 20:35:48 -0500 Original-Received: by mail-pj1-f50.google.com with SMTP id hd14-20020a17090b458e00b0021909875bccso7352860pjb.1 for <59977@debbugs.gnu.org>; Thu, 15 Dec 2022 17:35:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=CenX/ORrYQPBFXLb0sM78wqsDB/0JWu1LbuF3cIgBWU=; b=bIUpt+1yD0qVzz8/vjR1NUdfCDA6O4XycxqxsYSQ8QoYjbMwRnJzggkbVpbn7PN70a mD/YtjenYJBsGrsRfFWQocgps/uThrWitp2vdGplvLUdJ2CeNKSizwZrETLWH9s58azS iLM9e44K+TTBV4vcD6ytigRxyPJk4pHz665iQNF1lhWbSMMl/vJ+K1UA4u96c3FAJFAV 2Pm8Lk/MabP1JzKJUc2ttGMRD2yCvSV9kBYG20ncXMFFGHmo4kfzi1x/vlNA/2gh5HiA bNxnP8IkA3FAWyhADd7WE2fAR+IJqtKFDFqznnDnWCi6MwbUdIA0jKp33s12gDMiqkGP frjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CenX/ORrYQPBFXLb0sM78wqsDB/0JWu1LbuF3cIgBWU=; b=QpS7h0z59M9uqtUlT3mlN+TObPXz6qY9kwtEZV47f2OGJQPr42cIsmIOsS8kQfR+mU bMMz1kGHLqO/rt8PPUm6E8mPZwRUFpGOhwLouePjYSEwwqDs4kFCiower5SRMX6+Kdob 1Hgvn2qqIGgzy08c9P5tXowK3isJf6JFY3DQsp6OTfsFokCRhhGSYxXRom2rRne0dYvx HQFPwvnAQPHbBAtBnmsdhqICkvYf/WFcdmve3lp8Ec4GqSkXK5y5gXvkb9vJF7d0JgZB HtACkek6SS5+ntUtguXrMXWQh0x4EkYrrn6+QWcxt+esGwtEYRtL7KPAGJdIIQM/Qd8P +eWg== X-Gm-Message-State: ANoB5pmfpC7OLiM0BiLBq9+7DWNsG1BAvNbPg8243lJW+yZKlyspjolU TiBBRGAoasd+HET4cCNqYLM= X-Google-Smtp-Source: AA0mqf7Q5SOBa27uQa3V0XT3eeJnKiVkmXDY3VsnMzmdt1IHbwoNhMIxzOyVGn+4Q5l/Ykw4T1p/Ow== X-Received: by 2002:a17:903:328b:b0:189:f7c2:7245 with SMTP id jh11-20020a170903328b00b00189f7c27245mr33589612plb.45.1671154538759; Thu, 15 Dec 2022 17:35:38 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id h14-20020a170902f54e00b0018957322953sm297865plf.45.2022.12.15.17.35.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2022 17:35:38 -0800 (PST) X-Mailer: Apple Mail (2.3696.120.41.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251169 Archived-At: Jostein Kj=C3=B8nigsen writes: > On 12.12.2022 23:54, Yuan Fu wrote: >> Ah, yes. That=E2=80=99s because the "definition" feature, which is by = enabled by >> default, only highlights definition and ignores invocation. OTOH, the >> "function" feature highlights every instance of a function = identifier, >> but it isn=E2=80=99t enabled by default. > > I've tried latest python-ts-mode from latest emacs-29 branch, with > fontification set to level 4 and I can still reproduce this error. > > Looking at the code, I cannot see any "function" feature defined, and > to me it seems a patch like the one I added is required to introduce > this functionality. Yes, you are exactly right. My point is that the change belongs to "function" feature and not definition. I made a change that added your rules to a new "function" feature. >> Other tree-sitter major modes doesn=E2=80=99t >> have "definition" and enable "function" by default, I think. > > I believe this is standard for js-ts-mode, typescript-ts-mode, > tsx-ts-mode and csharp-ts-mode. Even on level 3, and if it wasn't, as > a user of those languages, I would argue in support of having it there > :) > > I can't "speak" on behalf of the other major-modes though. I=E2=80=99m sure a lot of people would prefer that, no doubt. The other = modes currently having them on level 3 is something we should fix (unless we end up deciding that we want "function" feature on level 3). >> I=E2=80=99m planning to standardize the features in each major mode = according to >> the list I showed you earlier. It=E2=80=99d be great if you can have = a look at >> that list and see if you have any opinions, before we decide on the >> final form of it and start to standardize those features in major = modes. >> (Of course, each language is different, the standard feature list is >> just a base upon which major modes will extend/modify.) >> >> Yuan > I guess that is another discussion entirely (how to implement a given > set of features). > > This bug is about a feature (function-call highlighting) being fully > missing :) Yes, I understand, I=E2=80=99m not against adding this in any way. Yuan