GNU bug report logs - #75422
30.0.93; [PATCH] forward-sexp and backward-sexp jump outside of comments in tsx-ts-mode

Previous Next

Package: emacs;

Reported by: Kohei Tsuruta <seventhepg <at> gmail.com>

Date: Tue, 7 Jan 2025 16:03:01 UTC

Severity: normal

Tags: patch

Fixed in version 30.0.93

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Kohei Tsuruta <seventhepg <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>, 75422 <at> debbugs.gnu.org
Subject: bug#75422: 30.0.93; [PATCH] forward-sexp and backward-sexp jump outside of comments in tsx-ts-mode
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'.




This bug report was last modified 189 days ago.

Previous Next


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