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
View this message in rfc822 format
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 <aqua0210 <at> foxmail.com> 写道:
>
> 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.
>
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.