From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= 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 15:07:04 +0100 Message-ID: <5fdb336f-f6cd-70c6-9390-ef284c283130@secure.kjonigsen.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21977"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: fgallina@gnu.org, 59977@debbugs.gnu.org, Theodor Thornhill To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 15:16:23 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 1p5p24-0005Ue-QS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 15:16:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5p1o-0000yN-35; Thu, 15 Dec 2022 09:16: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 1p5p1m-0000w0-OL for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 09:16:02 -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 1p5p1m-0004um-GZ for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 09:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5p1l-0006eC-UN for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 09:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 14:16:01 +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.167111375725546 (code B ref 59977); Thu, 15 Dec 2022 14:16:01 +0000 Original-Received: (at 59977) by debbugs.gnu.org; 15 Dec 2022 14:15:57 +0000 Original-Received: from localhost ([127.0.0.1]:43051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5p1h-0006dy-FU for submit@debbugs.gnu.org; Thu, 15 Dec 2022 09:15:57 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5p1f-0006ds-8n for 59977@debbugs.gnu.org; Thu, 15 Dec 2022 09:15:56 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 52BD05C0112; Thu, 15 Dec 2022 09:07:06 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 15 Dec 2022 09:07:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1671113226; x=1671199626; bh=1SllV+6xH6 voO3fJTA+3hvOBIyok7EAq3oG9HQUHYl8=; b=N40dfLR1dL+QjoP11BMvs1ggYc FPteH9dpPhDGe/WxwJVCzqsnsX/G8SFV5dMFJdyvXaDndMVHuaRJhPyXOpVqiJRR AXRS83zriOsLpATNOuxajv799NHpOPiqwe11VfZF4C5QfiKjvCXXIrwy6LFLuIWX G7X5crsBOIWh7NApx2CksJWZYgDmws52fkowBogqDG1lhaKQpsQrvjZ0la9st75K kmU1EYz8rEj+2rTaltcE/DqKOLx9H5Cp5jX7c3O4vTw+BnU14CGdeDuxrvNKZx9h LSld0zFA+fTsXgw4Ae8OzFHIg6c/u8NOvsFNitrONrWTghHQe52+dqbAroSg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1671113226; x= 1671199626; bh=1SllV+6xH6voO3fJTA+3hvOBIyok7EAq3oG9HQUHYl8=; b=x DuSt8tctW8YNN5lchu+5geBGB2uClFk69ZiUCYN3fLTqcpvF4Fng2xomwluqhqBX p64RjUQAx7arj3Ncu8WbFM6rKE1YjfglpNKBgzzUsCW2E4nLyDzRiOUDeTWb7Dxs RH181x5bDwEE5NG5kdD6uzf+8I52Ar7hnhbPy/Z5luCQ4lR+6cKmxS1V6IXwKGiB lKZh7tvHDCvaMbga7FP+YccUDkCLtWyikCMRMA1qvAIglwmMLxWj2mV86LNkU5D3 0ga3SQWLF5f73PZF3e77AOD4pNiM1l16TqFzR4tveEEW/79sp2quTbH2TZOROpGa yMyG+A1DaCeIjlkNjaSRw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeehgdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomheplfhoshht vghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnih hgshgvnhdrnhgvtheqnecuggftrfgrthhtvghrnheptddujefhvdekudefudffuddvuddu ieetheehkeelhedvgedtieevvdefieejtdffnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepjhhoshhtvghinhesshgvtghurhgvrdhkjhhonhhi ghhsvghnrdhnvght X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Dec 2022 09:07:05 -0500 (EST) Content-Language: en-US In-Reply-To: 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:251095 Archived-At: On 12.12.2022 23:54, Yuan Fu wrote: > Ah, yes. That’s 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’t 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. > Other tree-sitter major modes doesn’t > 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’m planning to standardize the features in each major mode according to > the list I showed you earlier. It’d 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 :) -- Jostein