GNU bug report logs - #60049
[PATCH] Add < and > to the syntax table in c++-ts-mode

Previous Next

Package: emacs;

Reported by: Daniel Martín <mardani29 <at> yahoo.es>

Date: Tue, 13 Dec 2022 21:40:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Yuan Fu <casouri <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#60049: closed ([PATCH] Add < and > to the syntax table in
 c++-ts-mode)
Date: Wed, 14 Dec 2022 02:11:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 13 Dec 2022 18:10:14 -0800
with message-id <8BF06E36-2ECC-43E4-8704-F02C08FD55C5 <at> gmail.com>
and subject line Re: bug#60049: [PATCH] Add < and > to the syntax table in c++-ts-mode
has caused the debbugs.gnu.org bug report #60049,
regarding [PATCH] Add < and > to the syntax table in c++-ts-mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
60049: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60049
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Daniel Martín <mardani29 <at> yahoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add < and > to the syntax table in c++-ts-mode
Date: Tue, 13 Dec 2022 22:39:36 +0100
[Message part 3 (text/plain, inline)]
Tags: patch


Given the following C++ code (where "|" represents the point):

|Expected<int> getFoo();

If you press C-M-d when c++-ts-mode is enabled, point moves to:

Expected<int> getFoo(|);

In c++-mode, point moves (correctly) to:

Expected<|int> getFoo();

Also, show-paren-mode does not highlight any <> pairs in c++-ts-mode.

My proposed fix is to create a syntax table for c++-ts-mode and add "<"
and ">" to it as open/close delimiters.

The attached patch implements the proposed solution.  Thanks.

[0001-Add-and-to-the-syntax-table-in-c-ts-mode.patch (text/patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Yuan Fu <casouri <at> gmail.com>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 60049-done <at> debbugs.gnu.org
Subject: Re: bug#60049: [PATCH] Add < and > to the syntax table in c++-ts-mode
Date: Tue, 13 Dec 2022 18:10:14 -0800
Daniel Martín <mardani29 <at> yahoo.es> writes:

> Tags: patch
>
>
> Given the following C++ code (where "|" represents the point):
>
> |Expected<int> getFoo();
>
> If you press C-M-d when c++-ts-mode is enabled, point moves to:
>
> Expected<int> getFoo(|);
>
> In c++-mode, point moves (correctly) to:
>
> Expected<|int> getFoo();
>
> Also, show-paren-mode does not highlight any <> pairs in c++-ts-mode.
>
> My proposed fix is to create a syntax table for c++-ts-mode and add "<"
> and ">" to it as open/close delimiters.
>
> The attached patch implements the proposed solution.  Thanks.

Applied, thanks!

Yuan


This bug report was last modified 2 years and 157 days ago.

Previous Next


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