Subject: bug#23298: 25.0.92; electric-pair-delete-pair doesn't check if parens are balanced

From: Andrii Kolomoiets <[email-masked]>
Date: Fri, 14 Aug 2020 12:37:42 +0300

Stefan Kangas <[email-masked]> writes:

>> Or a simpler example:
>>
>> (foo ()
>>
>> If you put point after the next-to-last character, then hitting DEL will
>> delete the last pair:
>>
>> (foo
>>
>> But...  I don't think this is a bug?  electric-pair-mode doesn't promise
>> to keep things balanced globally, but delete the matching pair if you
>> delete an opening parenthesis?  I think.
>>
>> Does that tally with what everybody else would expect?
>
> Do we have any electric-pair-mode users who could comment on this?

I for one wish electric-pair-mode to leave balanced closing parenthesis
in this case.