GNU bug report logs - #73978
31.0.50; Text syntax applied on too many things in tsx-ts-mode

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Thu, 24 Oct 2024 04:08:02 UTC

Severity: normal

Found in version 31.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 73978 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Theodor Thornhill <theo <at> thornhill.no>,
 73978 <at> debbugs.gnu.org
Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in
 tsx-ts-mode
Date: Sun, 24 Nov 2024 17:27:43 -0800

> On Nov 24, 2024, at 5:45 AM, Dmitry Gutov <dmitry <at> gutov.dev> wrote:
> 
> On 24/11/2024 09:47, Eli Zaretskii wrote:
>>> Hey sorry, I haven’t applied the patch. Actually, I want to ask you a question before I do: is there a way to mark a single character in buffer in string syntax? The only way I’m aware of is to mark string delimiter syntax to the start and end of the string, but that doesn’t work for a single character.
>>> 
>>> Take the following snippet as an example:
>>> 
>>> <button>a<button>
>>> 
>>> I want to apply string syntax to “a”.
>>> 
>>> If there’s no such way, I guess just not applying the string syntax in such case is also an option.
>> There's a syntax-table text property, see the node "Syntax Properties"
>> in the ELisp manual.  Would that do the job?
> 
> In particular, the "generic string" syntax property, this one
> 
>  (string-to-syntax "|")
> 
> You put it on the first and the last chars of a "generic string”.

The problem is, that doesn’t work when there’s only one character. Take the snippet as an example:

<button>a</button>

You can’t put the string fence syntax on the “a”, because there isn’t a closing fence to close it.

Yuan



This bug report was last modified 133 days ago.

Previous Next


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