From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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 08:25:33 +0300 Message-ID: <83k0jh9jn6.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9578"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50538@debbugs.gnu.org To: Jim Porter , Lars Ingebrigtsen , Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 16 07:26:15 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 1mQjuZ-0002MO-6B for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Sep 2021 07:26:15 +0200 Original-Received: from localhost ([::1]:42572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQjuW-0000jX-7O for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Sep 2021 01:26:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQjuM-0000jF-Ct for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 01:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQjuM-0005i8-45 for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 01:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQjuL-0005vi-UT for bug-gnu-emacs@gnu.org; Thu, 16 Sep 2021 01:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Sep 2021 05:26: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.163176994322771 (code B ref 50538); Thu, 16 Sep 2021 05:26:01 +0000 Original-Received: (at 50538) by debbugs.gnu.org; 16 Sep 2021 05:25:43 +0000 Original-Received: from localhost ([127.0.0.1]:53598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQju3-0005vC-E5 for submit@debbugs.gnu.org; Thu, 16 Sep 2021 01:25:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQju0-0005uy-2v for 50538@debbugs.gnu.org; Thu, 16 Sep 2021 01:25:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40044) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQjtt-0005Ly-Ad; Thu, 16 Sep 2021 01:25:34 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3821 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQjts-0001se-Ua; Thu, 16 Sep 2021 01:25:33 -0400 In-Reply-To: <716194ea-817f-eaad-f9ce-7d600ad359b1@gmail.com> (message from Jim Porter on Wed, 15 Sep 2021 15:17:23 -0700) 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:214443 Archived-At: > 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.