GNU bug report logs -
#60087
29.0.60; c++-ts-mode conflict with electric-pair-mode
Previous Next
Reported by: Eason Huang <aqua0210 <at> foxmail.com>
Date: Thu, 15 Dec 2022 11:34:02 UTC
Severity: normal
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 60087 <at> debbugs.gnu.org (full text, mbox):
João Távora <joaotavora <at> gmail.com> writes:
> On Thu, Dec 15, 2022 at 9:34 PM Daniel Martín <mardani29 <at> yahoo.es> wrote:
> Does the following patch solve this issue and bug#60049?
> diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
> index ff2ff63fd8..11b2b9408c 100644
> --- a/lisp/progmodes/c-ts-mode.el
> +++ b/lisp/progmodes/c-ts-mode.el
> @@ -86,8 +86,8 @@ c-ts-mode--syntax-table
> (defvar c++-ts-mode--syntax-table
> (let ((table (make-syntax-table c-ts-mode--syntax-table)))
> ;; Template delimiters.
>- (modify-syntax-entry ?< "(" table)
>- (modify-syntax-entry ?> ")" table)
>+ (modify-syntax-entry ?< "(>" table)
>+ (modify-syntax-entry ?> ")<" table)
> table)
> "Syntax table for `c++-ts-mode'.")
Hi Daniel,
Sorry for the delay feedback.
I tried your patch and it fixs bug#60049, but I just notice that `show-paren-mode` don't
play well with c++-ts-mode too (before and after this patch).
with the code snippet as below:
```
#include <iostream>
int main (){
std::cout << "Test" << '\n';
return 0;
}
```
With `show-paren-mode` enabled, then put cursor after the '}', the last
'<' will be matched and highlighted, the expected match is the '{'.
I hope this information will help you to understand the issue.
--
Eason Huang
This bug report was last modified 2 years and 142 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.