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: Sun, 12 Sep 2021 09:26:05 +0300

> From: Jim Porter <[email-masked]>
> Date: Sat, 11 Sep 2021 20:58:47 -0700
> 
> There are a few related issues with pairing double quotes in CC mode 
> while using `electric-pair-mode'. Hopefully the steps to reproduce below 
> will explain the issues. In all the cases, I'd expect 
> `electric-pair-mode' to insert a closing quote, but it doesn't.

Your expected results seem to expect Emacs to assume that a new string
will be inserted, but is that an assumption that is always true?  It
could be that the user wants to modify the existing string instead, in
which case your suggested patches will require the user to delete more
quotes than previously.