all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Yuan Fu <casouri@gmail.com>
Cc: Dmitry Gutov <dmitry@gutov.dev>,
	Theodor Thornhill <theo@thornhill.no>,
	73978@debbugs.gnu.org
Subject: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode
Date: Sun, 05 Jan 2025 10:21:25 +0200	[thread overview]
Message-ID: <87sepxwt3e.fsf@mail.linkov.net> (raw)
In-Reply-To: <874j2dy97k.fsf@mail.linkov.net> (Juri Linkov's message of "Sun,  05 Jan 2025 09:57:59 +0200")

> ReactDOM.render(
> <div>
> <h1>Hello, Welcome to React and TypeScript-!-</h1>
> </div>,
>   document.getElementById("root")
> );
>
> C-M-f moves point to
>
> ReactDOM.render(
> <div>
> <h1>Hello, Welcome to React and TypeScript</h1-!->
> </div>,
>   document.getElementById("root")
> );
>
> But maybe this is a different problem.

This can be fixed by the following patch that copied the syntax of < and >
from sgml-make-syntax-table:

diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el
index 09f29a4ac65..21672d2d9c1 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -692,7 +694,11 @@ tsx-ts--syntax-propertize-captures
                                      ne t)
              (put-text-property
               (match-beginning 0) (match-end 0)
-              'syntax-table (string-to-syntax ".")))))))))
+              'syntax-table (string-to-syntax
+                             (cond
+                              ((equal (match-string 0) "<") "(<")
+                              ((equal (match-string 0) ">") "(>")
+                              (t ".")))))))))))
 
 (if (treesit-ready-p 'tsx)
     (add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode)))





      reply	other threads:[~2025-01-05  8:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24  4:06 bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode Yuan Fu
2024-11-09  9:11 ` Eli Zaretskii
2024-11-09 16:49   ` Yuan Fu
2024-11-23 12:15     ` Eli Zaretskii
2024-11-24  5:25       ` Yuan Fu
2024-11-24  7:47         ` Eli Zaretskii
2024-11-24 13:45           ` Dmitry Gutov
2024-11-25  1:27             ` Yuan Fu
2024-12-11  4:52               ` Yuan Fu
2024-12-12  2:52                 ` Dmitry Gutov
2024-12-12  4:56                   ` Yuan Fu
2024-12-12 17:19                     ` Dmitry Gutov
2024-12-13  5:47                       ` Yuan Fu
2025-01-05 11:55                         ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-05 14:13                           ` Daniel Colascione
2024-12-24  7:59 ` Juri Linkov
2024-12-24  8:31   ` Juri Linkov
2024-12-24  8:52     ` Yuan Fu
2024-12-24 17:25       ` Juri Linkov
2024-12-24 20:57         ` Yuan Fu
2024-12-25  7:40           ` Juri Linkov
2024-12-25  8:33             ` Yuan Fu
2024-12-26  5:37               ` Dmitry Gutov
2025-01-04 19:58                 ` Yuan Fu
2025-01-05  7:57                   ` Juri Linkov
2025-01-05  8:21                     ` Juri Linkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sepxwt3e.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=73978@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=dmitry@gutov.dev \
    --cc=theo@thornhill.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.