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#62086: 29.0.60; ruby-ts-mode regressions Date: Wed, 12 Apr 2023 02:30:19 +0300 Message-ID: References: <86y1o5op2v.fsf@mail.linkov.net> <5abcf765-f8ce-9563-63aa-20c558409898@yandex.ru> <86cz4l7zjk.fsf@mail.linkov.net> <86ttxww12o.fsf@mail.linkov.net> <865yaakfs7.fsf@mail.linkov.net> <0bd5f2b8-6f0b-09d6-6240-38c742eca19f@yandex.ru> <861qkyfg8l.fsf@mail.linkov.net> <9ceb589f-9325-1607-d1b5-5fd56cb8c3ec@yandex.ru> <86y1myxsrq.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26756"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Cc: 62086@debbugs.gnu.org, Yuan Fu , Theodor Thornhill To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 12 01:31:23 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 1pmNSM-0006lj-Ok for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Apr 2023 01:31:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmNS4-000222-Rr; Tue, 11 Apr 2023 19:31:04 -0400 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 1pmNS3-00021n-R1 for bug-gnu-emacs@gnu.org; Tue, 11 Apr 2023 19:31:03 -0400 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 1pmNS2-000680-3s for bug-gnu-emacs@gnu.org; Tue, 11 Apr 2023 19:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmNS1-0005QD-LV for bug-gnu-emacs@gnu.org; Tue, 11 Apr 2023 19:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Apr 2023 23:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62086 X-GNU-PR-Package: emacs Original-Received: via spool by 62086-submit@debbugs.gnu.org id=B62086.168125583020797 (code B ref 62086); Tue, 11 Apr 2023 23:31:01 +0000 Original-Received: (at 62086) by debbugs.gnu.org; 11 Apr 2023 23:30:30 +0000 Original-Received: from localhost ([127.0.0.1]:38506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmNRW-0005PN-C3 for submit@debbugs.gnu.org; Tue, 11 Apr 2023 19:30:30 -0400 Original-Received: from forward501b.mail.yandex.net ([178.154.239.145]:43646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmNRT-0005PD-UO for 62086@debbugs.gnu.org; Tue, 11 Apr 2023 19:30:29 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-54.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-54.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:912:0:640:e196:0]) by forward501b.mail.yandex.net (Yandex) with ESMTP id 9A94D5F0B2; Wed, 12 Apr 2023 02:30:25 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-54.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id MUfrWn3W04Y0-OWCg4xG8; Wed, 12 Apr 2023 02:30:25 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1681255825; bh=gQNBinAmlOPhX1k6GHnhvzDvJX/XStFHmnCCaWavik8=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=mVGA+9iSQuSyWlKvmdfj5wrok/QH3N5Rr66+XReYZoloP1yKrgDbZhKBaZ/uPT9Dk 5+HZMXtma6iRN9QcotP55wpBN8Q+zBL0Px5kmbUW8sEBRH37QrRAVciW7aEwvSrqfg OD5ZTycW9jpxKNWv0eiRWZ2RgwqR8/3bldAbVEmA= Authentication-Results: mail-nwsmtp-smtp-production-main-54.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id ABDCE27C0054; Tue, 11 Apr 2023 19:30:22 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 11 Apr 2023 19:30:22 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekhedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnheptdffgeegkeelteevtdekleethfeftdduvdegkedtkedujefhfedtveeftdff udevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Apr 2023 19:30:20 -0400 (EDT) Content-Language: en-US In-Reply-To: <86y1myxsrq.fsf@mail.linkov.net> 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:259686 Archived-At: On 11/04/2023 19:53, Juri Linkov wrote: > I don't know if opening a new bug report is needed. > Actually I'm doing the same thing for more ts-modes - > trying to find a set of node names that match parens/brackets. > So maybe this patch makes sense too: These look sensible to me. I think we should give a chance to the authors to chime in, though. > treesit-sexp-type-regexp.patch > > diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el > index d773b4a41f4..e55d26177af 100644 > --- a/lisp/progmodes/c-ts-mode.el > +++ b/lisp/progmodes/c-ts-mode.el > @@ -927,7 +927,9 @@ c-ts-base-mode > "qualifier" > "type" > "parameter" > - "expression" > + ;; "expression" > + "argument_list" > + "identifier" > "literal" > "string"))) > > diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el > index f68ecb6fa6c..3876a5b54f1 100644 > --- a/lisp/progmodes/js.el > +++ b/lisp/progmodes/js.el > @@ -3827,7 +3827,9 @@ js--treesit-sentence-nodes > "See `treesit-sentence-type-regexp' for more information.") > > (defvar js--treesit-sexp-nodes > - '("expression" > + '("expression" ;; SHOULD NOT MATCH "expression_statement", BUT SHOULD MATCH "parenthesized_expression" > + "parenthesized_expression" > + "formal_parameters" > "pattern" > "array" > "function" > @@ -3845,7 +3847,13 @@ js--treesit-sexp-nodes > "undefined" > "arguments" > "pair" > - "jsx") > + "jsx" > + "statement_block" > + "object" > + "object_pattern" > + "named_imports" > + "class_body" > + ) > "Nodes that designate sexps in JavaScript. > See `treesit-sexp-type-regexp' for more information.") > > @@ -3893,7 +3901,7 @@ js-ts-mode > (regexp-opt js--treesit-sentence-nodes)) > > (setq-local treesit-sexp-type-regexp > - (regexp-opt js--treesit-sexp-nodes)) > + (rx-to-string `(seq bol (or ,@js--treesit-sexp-nodes) eol))) > > ;; Fontification. > (setq-local treesit-font-lock-settings js--treesit-font-lock-settings)