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

From: Eason Huang <[email-masked]>
Date: Thu, 29 Dec 2022 14:10:13 +0800

Hi all,

I can confirmed that the latest commit (909091d7578b7225601b202fb9257dedae879e9a)
 of Emacs-29 have been fix this bug#60087,  and `show-paren-mode` also get the expected result
 when c++-ts-mode enabled.

I think we can close this bug now.

----

Eason Huang

> 2022年12月27日 17:03，Eason Huang <[email-masked]> 写道：
> 
> João Távora <[email-masked]> writes:
> 
>> On Thu, Dec 15, 2022 at 9:34 PM Daniel Martín <[email-masked]> 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.
>