Subject: bug#50538: [PATCH] 28.0.50; electric-pair-mode fails to pair double quotes in some cases in CC mode

From: Eli Zaretskii <[email-masked]>
Date: Thu, 16 Sep 2021 08:25:33 +0300

> From: Jim Porter <[email-masked]>
> Cc: [email-masked]
> 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.