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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60049 in the body.
You can then email your comments to 60049 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#60049; Package emacs. (Tue, 13 Dec 2022 21:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Martín <mardani29 <at> yahoo.es>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 13 Dec 2022 21:40:02 GMT) Full text and rfc822 format available.

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

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 1 (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)]

Reply sent to Yuan Fu <casouri <at> gmail.com>:
You have taken responsibility. (Wed, 14 Dec 2022 02:11:02 GMT) Full text and rfc822 format available.

Notification sent to Daniel Martín <mardani29 <at> yahoo.es>:
bug acknowledged by developer. (Wed, 14 Dec 2022 02:11:02 GMT) Full text and rfc822 format available.

Message #10 received at 60049-done <at> debbugs.gnu.org (full text, mbox):

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 11 Jan 2023 12:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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