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

From: Juri Linkov <[email-masked]>
Date: Sun, 05 Jan 2025 09:43:41 +0200

>>> It’s better for these functions to check whether the definition of the
>>> thing they’re going to use exists or not, before calling
>>> treesit-node-match-p; alternatively, if they know they don’t care,
>>> they can pass t to IGNORE-MISSING.
>> 
>> Not sure how much this will degrade the performance of
>> every function that uses treesit-node-match-p.
>
> It should be negligible, plus if a function wants to use a thing, it’s
> TRT to first check if the thing exists, right?

I completely agree.  So I fixed 'treesit-show-paren'
by adding a check for 'treesit-thing-defined-p'.