From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs 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 Organization: LINKOV.NET Message-ID: <87sepxwt3e.fsf@mail.linkov.net> References: <1A3DAA8F-F00A-4984-AC0F-E62F021A690B@gmail.com> <87r05xmr24.fsf@mail.linkov.net> <87jzbpmqhm.fsf@mail.linkov.net> <9C416A93-5E86-4FE5-ADFB-092365169F09@gmail.com> <87ed1xkn7h.fsf@mail.linkov.net> <5626DFE7-CA89-4A39-A896-99D8814FD6CD@gmail.com> <87msgk43cv.fsf@mail.linkov.net> <28f6a7a3-8b09-41f9-8908-10a82be17aaa@gutov.dev> <077C5CF3-F487-4A88-9CC9-E7B329CB7C5B@gmail.com> <874j2dy97k.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13166"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Dmitry Gutov , Theodor Thornhill , 73978@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 09:43:30 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tUMEL-0003Gw-M0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 09:43:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUMDz-0007pP-4J; Sun, 05 Jan 2025 03:43:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUMDw-0007p8-7B for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 03:43:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUMDv-0007ur-Ss for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 03:43:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=kXvIYvMyu8WUD7QXYhY8y3J8E+6HscO12T7T4lDXk4g=; b=aqBzMZ3nfys0oPsOYSM/JfKVXrYa4PO/rOmbtbzfF1szGgUZJuw3IqlFy5xZZtTF8pjMN1TVI6MuTFuilvVuPbT5i1Dch7DLmxh7ZWpGZ+KHYSgtsHGDXfIi4bsuB4VqGByKpQbh1Ht+tqhTRFaZ38Pd1+9S2Tp562L53B+jveNsjs+jmMlQKziW8qFVWTcY4SZ9JhNxvQtJMJFZpE/xAp+YOhUevTsS9ymeMaHMmLMLY6yjTsBWRh4hot2pzg9AB+hBe90S3pZaqF6+RhBMcHH7ASNiZtT34hEeO8nVgFu9lWgKA9YMffX6IEFnZPgM6vBu/y8BBAnGn2Lfiw14ZQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUMDt-0004qu-Mf for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 03:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 08:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73978 X-GNU-PR-Package: emacs Original-Received: via spool by 73978-submit@debbugs.gnu.org id=B73978.173606654218574 (code B ref 73978); Sun, 05 Jan 2025 08:43:01 +0000 Original-Received: (at 73978) by debbugs.gnu.org; 5 Jan 2025 08:42:22 +0000 Original-Received: from localhost ([127.0.0.1]:59786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUMDG-0004pV-0m for submit@debbugs.gnu.org; Sun, 05 Jan 2025 03:42:22 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:47627) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUMDC-0004pA-On for 73978@debbugs.gnu.org; Sun, 05 Jan 2025 03:42:20 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 7D7B91BF203; Sun, 5 Jan 2025 08:42:09 +0000 (UTC) In-Reply-To: <874j2dy97k.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 05 Jan 2025 09:57:59 +0200") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298518 Archived-At: > ReactDOM.render( >
>

Hello, Welcome to React and TypeScript-!-

>
, > document.getElementById("root") > ); > > C-M-f moves point to > > ReactDOM.render( >
>

Hello, Welcome to React and TypeScript >

, > 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)))