Subject: bug#75198: 31.0.50; [treesitter] peculiar error

From: Juri Linkov <[email-masked]>
Date: Mon, 30 Dec 2024 19:54:55 +0200

close 75198 31.0.50
thanks

>> M-x bash-ts-mode
>> Move cursor
>>
>> peculiar error: ("Cannot find the definition of the predicate in
>> `treesit-thing-settings'" sexp-list)
>>
>> Emacs becomes pretty much unusable after that.
>
> I rather suspect 1addae07be1982a6cafc0e0b3955b59bd1fb481c "Treesit
> support for show-paren-mode". At least by commenting out line 3592
>
>   (setq-local show-paren-data-function 'treesit-show-paren-data)
>
> in treesit.el I can work around the problem.

Sorry, this is fixed now.

The problem is that 'treesit-parent-until' raises an error by default.
So needed to copy its implementation where treesit-node-match-p
sets the argument IGNORE-MISSING to t.

Or maybe better to add new arg IGNORE-MISSING to treesit-parent-until.