From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode Date: Sun, 17 Dec 2023 23:36:46 +0200 Message-ID: <53f96024-5515-2579-6d12-59d6e2cbe4ed@gutov.dev> References: <8734xdni6y.fsf@yandex.ru> <831qcwycbj.fsf@gnu.org> <83v8a3qh6m.fsf@gnu.org> <834jhadvkt.fsf@gnu.org> <7aee7e42-c07d-9131-18a9-4806f07d4267@gutov.dev> <83a5qw7izt.fsf@gnu.org> <172531702081590@mail.yandex.ru> <212931702208489@mail.yandex.ru> <0c6e2e14-b494-a8cb-3893-ffb39577baf9@gutov.dev> <7b17c99d-6e4b-43b3-af93-993901a3a4ea@gmail.com> <95071702343720@mail.yandex.ru> <78ffdcf3-e322-49ea-a0d5-d0485ade9e73@gmail.com> 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="35006"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Eli Zaretskii , Denis Zubarev , "67061@debbugs.gnu.org" <67061@debbugs.gnu.org> To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 17 22:37:33 2023 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 1rEypH-0008lo-Nq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Dec 2023 22:37:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEyoo-000805-Kr; Sun, 17 Dec 2023 16:37:02 -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 1rEyon-0007zo-BI for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 16:37:01 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEyon-0004AB-2j for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 16:37:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEyoo-0007rY-AM for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 16:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Dec 2023 21:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67061 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67061-submit@debbugs.gnu.org id=B67061.170284902130217 (code B ref 67061); Sun, 17 Dec 2023 21:37:02 +0000 Original-Received: (at 67061) by debbugs.gnu.org; 17 Dec 2023 21:37:01 +0000 Original-Received: from localhost ([127.0.0.1]:59081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEyon-0007rI-2q for submit@debbugs.gnu.org; Sun, 17 Dec 2023 16:37:01 -0500 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:40965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEyol-0007r1-3v for 67061@debbugs.gnu.org; Sun, 17 Dec 2023 16:36:59 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id EA7203200A2A; Sun, 17 Dec 2023 16:36:50 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 17 Dec 2023 16:36:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1702849010; x=1702935410; bh=+mok1SBwckPYaha9dzu0tQxrfssL4hVHj3mDWmhE2Sc=; b= jYyvMtmlCHCsfNJJ/QJXMRhyaRpcZqr+j4x55a3kM4WdS1D1bUBi2RRH9TuUN0DZ SRqyM8dJxIJ3gnXNirkexGAHeNRVxfPYYLDr2mG8/v0tVvObwiO5XCTbjosTdUwu uhGjRLUap9Nsicv9HLpOqMjsmAzb9n/AM3BcT/wIJphkMxA5xX5ap1BZW6fgmR6r Aho7NL3l3Sc3XIWaohl5aRPxXKGWhqs46qDImD6iYZwPGquaigzLlEBHWDekotxu hnf3CQxf2B24vL56CgKbY92Yj/B6Vuj/vVr4fxayoHUY+JzFpnYodgswyecCxqrA g51rPhcGkvIq9PLnHGUX8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1702849010; x= 1702935410; bh=+mok1SBwckPYaha9dzu0tQxrfssL4hVHj3mDWmhE2Sc=; b=f NcWhxxj5l/p1jOQQ/tOQI6MhWVzzFUIUz+STA0IQtURXQUF/f+c9ZUsXWfWm2/zu Q4XSU4zUS/GdDOCprhz5UHs71JoSJA/3mE7vvXEwzxG8KS9srYjqDnsORJ2iZox2 xYN5Gbj3Ao3IKVAocakZzl2DxL5ev8DPeX/9s6tU/o+hBwlcgfMS9it+kkQcgCLY u0WLZZXCcsV0Jj7RRexdm0QFoZLHkd8OimW61PAbvv+2PJj4AIojJv/O7cyPp3mx odp+ZAqslpn9TgpNswEEsUnnydk2DP0ApouNH1+seb/SUjteBs8lg2XCvVAcODjk EN3xoTM4JtF5M3h5oxqRw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddtiedgudehtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpefhffehleejffegffeugefhkeektdffgfehjedvgeejtedtudehueffgffg feejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 17 Dec 2023 16:36:49 -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:276442 Archived-At: On 17/12/2023 03:07, Yuan Fu wrote: > >> On Dec 14, 2023, at 3:51 AM, Dmitry Gutov wrote: >> >> On 14/12/2023 07:54, Yuan Fu wrote: >>>> I think the 'definition' feature is good for it (going by the name, since it's an implicit variable declaration), but it could be split off into a separate feature too. >>> As long as it’s not added to the definition feature, because, again, definition is at level 1 and I don’t want to keep level 1 minimal. >>> Maybe we can use local-definition, or something similar, to signify that this feature highlights scoped definitions. >> But you think function parameters should be in 'definition'? They are also "scoped", I would say. > I don’t think function parameters should be in ‘definition’. In fact, in my head, only the variable/function/class name of top-level constructs should be in ‘definition’. Now I can see that the name ‘definition’ is too vague for my original intent, and most ts modes probably don’t share the same interpretation as I do... > > Maybe we can allow definition to include more things and move it to level 3, and add a more restricted ’top-level-definition’ to level 1 to take it’s current role. WDYT? What about a split like function-definition/variable-definition? Not all functions are top-level. But there are also classes... Or the features could just be called 'definition' and 'variable-definition', and that the former only contains functions and classes might simply be implied by the existence of the latter.