From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#50538: [PATCH] 28.0.50; electric-pair-mode fails to pair double quotes in some cases in CC mode Date: Thu, 16 Sep 2021 18:26:36 +0000 Message-ID: References: <021853bf-0169-c158-ab3d-296b6c144e08@gmail.com> <83r1dufgxu.fsf@gnu.org> <94c7b4ec-813b-515f-d947-116c294dd74b@gmail.com> <716194ea-817f-eaad-f9ce-7d600ad359b1@gmail.com> <83k0jh9jn6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24471"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jim Porter , Lars Ingebrigtsen , 50538@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 16 20:28:49 2021 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 1mQw7s-0006AH-Rv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Sep 2021 20:28:48 +0200 Original-Received: from localhost ([::1]:36052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQw7r-00052w-O6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Sep 2021 14:28:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQw6A-0004h0-L7 for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 14:27:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQw69-0000hy-W4 for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 14:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQw69-0002Xm-Ns for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 14:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Sep 2021 18:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50538 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 50538-submit@debbugs.gnu.org id=B50538.16318168089752 (code B ref 50538); Thu, 16 Sep 2021 18:27:01 +0000 Original-Received: (at 50538) by debbugs.gnu.org; 16 Sep 2021 18:26:48 +0000 Original-Received: from localhost ([127.0.0.1]:56527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQw5v-0002XD-M7 for submit@debbugs.gnu.org; Thu, 16 Sep 2021 14:26:47 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:20187 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mQw5r-0002Wr-M7 for 50538@debbugs.gnu.org; Thu, 16 Sep 2021 14:26:46 -0400 Original-Received: (qmail 15368 invoked by uid 3782); 16 Sep 2021 18:26:36 -0000 Original-Received: from acm.muc.de (p4fe15a47.dip0.t-ipconnect.de [79.225.90.71]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 16 Sep 2021 20:26:36 +0200 Original-Received: (qmail 9483 invoked by uid 1000); 16 Sep 2021 18:26:36 -0000 Content-Disposition: inline In-Reply-To: <83k0jh9jn6.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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" Xref: news.gmane.io gmane.emacs.bugs:214495 Archived-At: Hello, Eli. On Thu, Sep 16, 2021 at 08:25:33 +0300, Eli Zaretskii wrote: > > From: Jim Porter > > Cc: 50538@debbugs.gnu.org > > Date: Wed, 15 Sep 2021 15:17:23 -0700 > > On 9/11/2021 8:58 PM, Jim Porter wrote: > > > (Note: I've just updated my copyright assignment information, but > > > haven't received confirmation that everything is in order, so this might > > > need to wait until that's done for it to merge.) > > I've gotten confirmation that my copyright assignment info is all > > up-to-date, so once this patch passes muster, it should be ok to merge it. > Your copyright assignment is on file, so we are good in that > department. > > On 9/12/2021 11:05 AM, Jim Porter wrote: > > > Note however that this solution isn't perfect: it means a user's custom > > > `electric-pair-inhibit-predicate' can only inhibit *more* than CC mode's > > > default behavior, not less. I think that's a reasonable compromise > > > though, and users who want more direct control can set > > > `electric-pair-inhibit-predicate' inside `c-mode-common-hook'. A > > > "perfect" solution here would probably require adding new customization > > > points to `electric-pair-mode' (e.g. a way for major modes to override > > > how the syntax is analyzed), and I'm not sure the added complexity would > > > be worth it, especially since this code is already a bit tricky. > > I'm not sure if someone has a better idea for how to do things, but for > > my config[1], the patch works well and makes CC modes behave the same as > > other programming modes. In my opinion, the worst thing > > `electric-pair-mode' can do is to behave inconsistently, since that > > forces the user to pay close attention to something that should be > > almost invisible/automatic. > I don't use this minor mode, so I don't think my opinion on this > matters much. I will defer to Lars and Alan here. Thanks, I've downloaded the bug thread from debbugs, and I'll look at it. I don't actually use the minor mode either, but the patch is to do with C++ Mode. -- Alan Mackenzie (Nuremberg, Germany).