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#65470: 29.1.50; js-ts-mode: regex pattern can cause incorrect parenthesis matching Date: Sat, 16 Sep 2023 23:07:50 +0300 Message-ID: <30f77d0f-dd3a-bca1-9106-0d2513ba5340@gutov.dev> References: <127B5BEA-A24B-48A3-9827-85B7CDB67D10@secure.kjonigsen.net> <5f823f8f-d249-f4a1-71e6-083e47d0d123@gutov.dev> <83jztbeeh2.fsf@gnu.org> <03415a27-f082-b204-cece-19a9859e178d@gutov.dev> <8334zze5l4.fsf@gnu.org> <1363c54f-5109-f000-3333-78d291b2096d@gutov.dev> <2D516F0C-D7A8-49D2-8009-F911EFC55C78@secure.kjonigsen.net> <2f525ebe-74e5-dcbe-4403-5e9ae001795c@gutov.dev> <5e57b91b-2967-d82d-eca5-65dc206887cf@gutov.dev> <16E4F60E-5216-457F-A79F-F8FBB5A01D61@secure.kjonigsen.net> <6638462f-89fe-97c4-f008-27e1e2415d2b@gutov.dev> <835y4ak6hz.fsf@gnu.org> <834jjuicun.fsf@gnu.org> <831qeyibxp.fsf@gnu.org> 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="38445"; 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: btuin@mailo.com, jostein@secure.kjonigsen.net, 65470@debbugs.gnu.org, theo@thornhill.no, monnier@iro.umontreal.ca To: Eli Zaretskii , casouri@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 16 22:09:05 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 1qhbbD-0009nt-QJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Sep 2023 22:09:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhbb6-0003x9-N8; Sat, 16 Sep 2023 16:08:56 -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 1qhbb5-0003wy-AB for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 16:08:55 -0400 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 1qhbb5-00084h-2B for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 16:08:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhbbC-0000pk-6z for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 16:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Sep 2023 20:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65470 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65470-submit@debbugs.gnu.org id=B65470.16948948903139 (code B ref 65470); Sat, 16 Sep 2023 20:09:02 +0000 Original-Received: (at 65470) by debbugs.gnu.org; 16 Sep 2023 20:08:10 +0000 Original-Received: from localhost ([127.0.0.1]:48584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhbaL-0000oY-JD for submit@debbugs.gnu.org; Sat, 16 Sep 2023 16:08:09 -0400 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:47611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhbaJ-0000oB-Af for 65470@debbugs.gnu.org; Sat, 16 Sep 2023 16:08:07 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id F0F73320030E; Sat, 16 Sep 2023 16:07:53 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 16 Sep 2023 16:07:54 -0400 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:sender:subject:subject:to:to; s=fm3; t= 1694894873; x=1694981273; bh=n3nmKcD9S8X+PNyjL6AAyc9mU+2UKFKh9IX PZxw6oaM=; b=T1EE0bKNfSEJReApFmd9f8EsscPMM2d2WiKLiRILzBr1L1LboLt pDElUsZPmhnmdg2iXqxu2vQaHXE21ntF044lcslXeYSLwNny537+w1OvdF+kOTYc 0nmktx5pekuzr3nQXDe8qSklokdiNpcOggFnorjpAl6usnRHz0l/2bh64GrEf98W 2PEFUoRr+a2uHo8J2JGUgEf1Av7pozUPA+tqLKX0kXxO9nLWE819mhauYj4UXOTq NxzPlgU2h6QGRNEZ1m1t+3vrUtXJc+zgJkHrtmZX6hjr6LVjg4JCe9fb1P82cork FliIjCj+5QZdyEd12PpDvh/Lo2xk+urYOSw== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1694894873; x=1694981273; bh=n3nmKcD9S8X+PNyjL6AAyc9mU+2UKFKh9IX PZxw6oaM=; b=e23IHAH925cdq5XAKJqDExRg2gULX8Xyq5jOAtWWbpWRUm4ybk2 Xk9PMOV2D6SYDQ0JCSLmxtwSqZvncBraCnYkA6TUkOX4gzDq7uiL6XID5ziGDodL W1yKj2AHWFd4vZGQ8mRdotfCaf+6wdCbhOrtC918UGXasJw+9scdIguslbxhRPEE cfJvrTQrOgQoh1MVOkcZ3IS/uemI4TlPLMpa6O/MGzXKKSpKz+OqG6KVXZ/fM5DU y0x3/z8f7uxH1R/QxLzHoqd15KzEs1Ijb3UmEZB3LQMEewIqHs/50zWk5h/D3EjI RCi7+AG/X7MaKPu4yHgcgxPVsRrqrC/+dBg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejgedgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpefhffehleejffegffeugefhkeektdffgfehjedvgeejtedtudehueffgffg feejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Sep 2023 16:07:51 -0400 (EDT) Content-Language: en-US In-Reply-To: <831qeyibxp.fsf@gnu.org> 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:270649 Archived-At: On 16/09/2023 14:40, Eli Zaretskii wrote: >> This also causes byte-compilation warnings on a system that has no >> tree-sitter installed: >> >> In end of data: >> progmodes/typescript-ts-mode.el:498:17: Warning: the function ‘treesit-node-end’ is not known to be defined. >> progmodes/typescript-ts-mode.el:497:17: Warning: the function ‘treesit-node-start’ is not known to be defined. >> progmodes/typescript-ts-mode.el:474:6: Warning: the function ‘treesit-query-compile’ is not known to be defined. >> >> Could you please fix these? > I fixed this myself by simply declaring the functions the > byte-compiler was complaining about, but I'd be happier if someone > could explain these warnings, since the offending functions are not > called anywhere in the code I could see. What did I miss? treesit-node-start/end are called in tsx-ts--syntax-propertize-captures (note the rename I just performed), and treesit-query-compile is called in *-ts--s-p-query's init forms. Both added in commit 1fb2fb501f3 reviewed by yours truly, so, sorry about that.