Subject: Re: bug#75422: 30.0.93; [PATCH] forward-sexp and backward-sexp jump outside of comments in tsx-ts-mode

From: Juri Linkov <[email-masked]>
Date: Wed, 08 Jan 2025 09:44:48 +0200

>>> diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el
>>> index 4a38d1da596..0ffcb144771 100644
>>> --- a/lisp/progmodes/typescript-ts-mode.el
>>> +++ b/lisp/progmodes/typescript-ts-mode.el
>>> @@ -564,7 +564,9 @@ tsx-ts-mode
>>>                    (sentence ,(regexp-opt
>>>                                (append typescript-ts-mode--sentence-nodes
>>>                                        '("jsx_element"
>>> -                                         "jsx_self_closing_element")))))))
>>> +                                         "jsx_self_closing_element"))))
>>> +                   (text ,(regexp-opt '("comment"
>>> +                                        "template_string"))))))
>
> I think it’s fine. Though it’s for Eli to decide.

Eli, is it ok to push this patch to emacs-30?

It fills the omission that the thing 'text' is defined
only for 'typescript', but not for its counterpart 'tsx'.

BTW, in master we need to clean up typescript-ts-base-mode
that defines only 'typescript', but not 'tsx', i.e. we need
to create better inheritance for 'treesit-thing-settings'.