GNU bug report logs - #65470
29.1.50; js-ts-mode: regex pattern can cause incorrect parenthesis matching

Previous Next

Package: emacs;

Reported by: Augustin Chéneau (BTuin) <btuin <at> mailo.com>

Date: Wed, 23 Aug 2023 11:16:01 UTC

Severity: normal

Tags: patch

Found in version 29.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Eli Zaretskii <eliz <at> gnu.org>, casouri <at> gmail.com
Cc: btuin <at> mailo.com, jostein <at> secure.kjonigsen.net, 65470 <at> debbugs.gnu.org, theo <at> thornhill.no, monnier <at> iro.umontreal.ca
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
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.




This bug report was last modified 1 year and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.