bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60087: 29.0.60; c++-ts-mode conflict with electric-pair-mode


From: Eason Huang
Subject: bug#60087: 29.0.60; c++-ts-mode conflict with electric-pair-mode
Date: Tue, 27 Dec 2022 17:03:27 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

João Távora <joaotavora@gmail.com> writes:

> On Thu, Dec 15, 2022 at 9:34 PM Daniel Martín <mardani29@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]