From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eason Huang Newsgroups: gmane.emacs.bugs Subject: bug#60087: 29.0.60; c++-ts-mode conflict with electric-pair-mode Date: Tue, 27 Dec 2022 17:03:27 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10867"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: casouri@gmail.com, Stefan Monnier , 60087@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 27 10:05:36 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pA5tv-0002bw-Ux for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Dec 2022 10:05:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pA5tV-0008Jp-JX; Tue, 27 Dec 2022 04:05:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pA5tO-0008J9-T0 for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 04:05:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pA5tO-0004J6-5H for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 04:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pA5tN-0003vY-Vf for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2022 04:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eason Huang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Dec 2022 09:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60087 X-GNU-PR-Package: emacs Original-Received: via spool by 60087-submit@debbugs.gnu.org id=B60087.167213189515081 (code B ref 60087); Tue, 27 Dec 2022 09:05:01 +0000 Original-Received: (at 60087) by debbugs.gnu.org; 27 Dec 2022 09:04:55 +0000 Original-Received: from localhost ([127.0.0.1]:54690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pA5tG-0003vB-TO for submit@debbugs.gnu.org; Tue, 27 Dec 2022 04:04:55 -0500 Original-Received: from out203-205-251-72.mail.qq.com ([203.205.251.72]:35579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pA5tC-0003ur-9K for 60087@debbugs.gnu.org; Tue, 27 Dec 2022 04:04:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1672131881; bh=jANVLrVAZHkBC6B/66hMicgKvB9j1AFeVVHOm92T/d0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=YIN0GOo8+Mh/HDnnPhadItVb8NZ/FUHVkTVVC06ab0hm8oUJngplRtQ4GM/2nr83c iojZR68Q2HYe51xjin60ODJ/bQR7q76uLkq3oztL5CWpTFPwsTB89ii9j5zjzwYEQz mIiuoedKQnDIJ4oeP9s5Px6x/GonWBkKthVlo78I= Original-Received: from macbook ([114.82.35.56]) by newxmesmtplogicsvrszc2-1.qq.com (NewEsmtp) with SMTP id DC06E0E; Tue, 27 Dec 2022 17:03:28 +0800 X-QQ-mid: xmsmtpt1672131808tgm2skii9 X-QQ-XMAILINFO: Nci1v0XuD9lFuRp/fha58okuMlgn/HCVnMEjpvTcCZEz6+5EuITPRqbEWEcWOP aoesURL3rcXG4iMhxrght2noLXJmpSqIIjHjPLpl1VBiQUVQj2AniaC8sLIeKVh8H+VTrl6l04rL lTpFymkk1wJgnEK4V8etk7owlGGiUjQ/Mz302Q2fTRq0SxLIPRVzW/v+H8Hv5fY7s3QImNNfiolH VczbRsq9rjBf4JtW4CgfprRmXYWxntutvI6lgbgZ3yN792AdRHAmHEDMIvD02WBMqg/FMZzZeAGZ 5ngW9Gn7sEqUq+/nN6puuBcoEWYwlSI1Fi6wiy1WoF0yPsqixaM2Fdw5QJB/WFcjzdnxn7mhEaMy liwwPGyaRmn7wpa0npbfkW7W2u0br1Ro1aDz4HIUb/7F6oFOiqTgpKd0+5zG0F2T/TOSKW6zUi/O ucBZ7rcmUIX5Byby77IhD7Zs9XK9Rf8PqyNzRMTauPf582xF7mRfyu3ewRscMHBd0b+yENsH300A Vk2nWj18FaVVIqdevhEvAwmYwCE4lzwmgs8HRncLREQ7PMhS5XQGEQZlFGeop04hQmS3iEenPzim 67XRCjEAbyLxMUkigUsz9tZyRj/EghlsxsQ7HDjfVIKLQA3xCrL6SPMJrIa9jDZ5ttPkr4lpmHNR DhEcGBEMd+UnsM4EW9+CXXZ7CSCMEVEFzNV0tZdImtlF+bJlgMQCKEeV98bf0GCQWuBps+S20NoI DSRJM9a6DEX5Qo9DlTkKmg8i4C5ZfUsYvtZGh6rvf2vldGJ649dLYugc7uqdRFurxO0ZXL5zqWbW Q27F1E7jrUEMY7L5EZl5NW3ajkflFjSpzrc71W5X In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 15 Dec 2022 21:43:19 +0000") Original-Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251938 Jo=C3=A3o T=C3=A1vora writes: > On Thu, Dec 15, 2022 at 9:34 PM Daniel Mart=C3=ADn w= rote: > 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-pare= n-mode` don't play well with c++-ts-mode too (before and after this patch). with the code snippet as below: ``` #include 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. --=20 Eason Huang