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#67684: 30.0.50; Font lock rule conflict in js-ts-mode at level 4 Date: Fri, 8 Dec 2023 03:33:16 +0200 Message-ID: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------780rDRqKj3MOp0LNeqC2YbE4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9999"; 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 To: =?UTF-8?Q?Lo=C3=AFc_?= =?UTF-8?Q?Lema=C3=AEtre?= , 67684@debbugs.gnu.org, Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 08 02:34:20 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 1rBPkx-0002Nk-1l for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Dec 2023 02:34:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBPkV-0003sQ-F1; Thu, 07 Dec 2023 20:33:51 -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 1rBPkT-0003s2-Ng for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 20:33:49 -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 1rBPkT-0006QN-FR for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 20:33:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBPkf-0004Q3-SJ for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 20:34:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Dec 2023 01:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67684 X-GNU-PR-Package: emacs Original-Received: via spool by 67684-submit@debbugs.gnu.org id=B67684.170199922416949 (code B ref 67684); Fri, 08 Dec 2023 01:34:01 +0000 Original-Received: (at 67684) by debbugs.gnu.org; 8 Dec 2023 01:33:44 +0000 Original-Received: from localhost ([127.0.0.1]:43417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBPkN-0004PF-I3 for submit@debbugs.gnu.org; Thu, 07 Dec 2023 20:33:44 -0500 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:39539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBPkL-0004Ot-8h for 67684@debbugs.gnu.org; Thu, 07 Dec 2023 20:33:42 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1F37D3200B7D; Thu, 7 Dec 2023 20:33:22 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 07 Dec 2023 20:33:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-type: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=fm3; t=1701999201; x=1702085601; bh=97 oCqrnv98iDGGE6zNTewXMUjHs1hFr36FHk7t4sLbM=; b=CciqCcbI6HHCwwLFPK 8T7ijScODUof+2I68WVm8kCgbHTLP77WsZkirvXCOUZsKJvvjEW3+865efOeszll O85huXK5p9zBoSYpXP8huZXC8qK3M0lhMYKPu3K95VBrXUhX8qZLALIRvg4gNUjB kM1e7qnX/gGjg3MtQ0pOBP92lZsLoKu1KvqVwI4qrrirpswvrtzAUWw4inCIMhvx o2N69Mwe15CUUpZ0HE6dsY7mNwoUrcVnO+EOSxr4kbP2azheElh5FHsPVCh/l3Mr Eg6djRd2BR7NpZCP5tXN2meSQM2MQtotPVZxPHaAOY5anArK4uoLUTV8xojVgk4h ipaQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701999201; x=1702085601; bh=97oCqrnv98iDG GE6zNTewXMUjHs1hFr36FHk7t4sLbM=; b=mb8PG3huOFR2U4FT21PqEqBL3GzVp 9aBjhhuHVveX6v64jgbzyLY1dO7dGhv7EiyAlIjDU7KiD5Ldo7pFRkiGu3/t0IeA bk9PHBmC75HPKQQ7O+G6TjtQ24KJDZFzt16KnwlRwx3zt1RZJnZRgc+W3yBaqHlx 0JxR7G+itRWpJHgS9Tsl9CYre0jgcfeaVTUXbUxRhB3sjdEFxbJZ4dSU78M52unL GW5e8zNdvMEKJFcQE7e8ITHFP7+5cEE+gao/W1juuZxRrkWtoR1hnLDeZD2JIGXn T5FzptBpigtrr4Wz/bklvLCpimS7gAXG81sM0uSuM3LEq5lrYxi9IsUbA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekgedgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfkffggfgfuvfhfhfgjsehmtderredtfeejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnheptdejgeetieffhfejfffgffeiieettedvtefgueeuieevjedtgeeuvdehgeefhedv necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Dec 2023 20:33:20 -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:275714 Archived-At: This is a multi-part message in MIME format. --------------780rDRqKj3MOp0LNeqC2YbE4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi! On 07/12/2023 12:07, Loïc Lemaître wrote: > I have noticed a font coloration issue in js-ts-mode when setting the > treesit font lock level to 4: JSX attributes color is not the same than > at level 3. > There should have a conflict between rules for "property_identifier" > treesit type. The feature that triggers the conflict is "property" (of > the level 4). > > You can reproduce the issue by following these steps: > - M-: (setq treesit-font-lock-level 4) > - M-x js-ts-mode on a JSX buffer > > Note that the bug already exists in Emacs 29.1. The attached patch seems to fix that. But it removes a function added by Yuan in e78e69b33189, while reshuffling the highlights to reorder priorities. Yuan, do you remember why you did it that way back then? Perhaps I'm missing some other conflict. --------------780rDRqKj3MOp0LNeqC2YbE4 Content-Type: text/x-patch; charset=UTF-8; name="js-ts-font-lock-property.diff" Content-Disposition: attachment; filename="js-ts-font-lock-property.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL2pzLmVsIGIvbGlzcC9wcm9nbW9kZXMvanMu ZWwKaW5kZXggNWE2NjlmZGJkNDIuLmUyYjc0OGY2Y2I4IDEwMDY0NAotLS0gYS9saXNwL3By b2dtb2Rlcy9qcy5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9qcy5lbApAQCAtMzU3MCwxNiAr MzU3MCw2IEBAIGpzLS10cmVlc2l0LWZvbnQtbG9jay1zZXR0aW5ncwogICAgICA7OyBmdWxs IG5hbWVzcGFjZSBpbXBvcnQgKCogYXMgYWxpYXMpCiAgICAgIChpbXBvcnRfY2xhdXNlIChu YW1lc3BhY2VfaW1wb3J0IChpZGVudGlmaWVyKSBAZm9udC1sb2NrLXZhcmlhYmxlLW5hbWUt ZmFjZSkpKQogCi0gICA6bGFuZ3VhZ2UgJ2phdmFzY3JpcHQKLSAgIDpmZWF0dXJlICdwcm9w ZXJ0eQotICAgJygoKHByb3BlcnR5X2lkZW50aWZpZXIpIEBmb250LWxvY2stcHJvcGVydHkt dXNlLWZhY2UKLSAgICAgICg6cHJlZCBqcy0tdHJlZXNpdC1wcm9wZXJ0eS1ub3QtZnVuY3Rp b24tcAotICAgICAgICAgICAgIEBmb250LWxvY2stcHJvcGVydHktdXNlLWZhY2UpKQotCi0g ICAgIChwYWlyIHZhbHVlOiAoaWRlbnRpZmllcikgQGZvbnQtbG9jay12YXJpYWJsZS11c2Ut ZmFjZSkKLQotICAgICAoKHNob3J0aGFuZF9wcm9wZXJ0eV9pZGVudGlmaWVyKSBAZm9udC1s b2NrLXByb3BlcnR5LXVzZS1mYWNl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RoYXQgTk9ERSwgYSBw cm9wZXJ0eV9pZGVudGlmaWVyLCBpcyBub3QgdXNlZCBhcyBhIGZ1bmN0aW9uLiIKLSAgKG5v dCAoZXF1YWwgKHRyZWVzaXQtbm9kZS10eXBlCi0gICAgICAgICAgICAgICAodHJlZXNpdC1u b2RlLXBhcmVudCA7IE1heWJlIGNhbGxfZXhwcmVzc2lvbi4KLSAgICAgICAgICAgICAgICAo dHJlZXNpdC1ub2RlLXBhcmVudCA7IE1heWJlIG1lbWJlcl9leHByZXNzaW9uLgotICAgICAg ICAgICAgICAgICBub2RlKSkpCi0gICAgICAgICAgICAgICJjYWxsX2V4cHJlc3Npb24iKSkp Ci0KIChkZWZ2YXIganMtLXRyZWVzaXQtbGhzLWlkZW50aWZpZXItcXVlcnkKICAgKHdoZW4g KHRyZWVzaXQtYXZhaWxhYmxlLXApCiAgICAgKHRyZWVzaXQtcXVlcnktY29tcGlsZSAnamF2 YXNjcmlwdCAnKChpZGVudGlmaWVyKSBAaWQK --------------780rDRqKj3MOp0LNeqC2YbE4--