Subject: bug#79047: Add some multi-character pairs to some major modes.

From: Stefan Monnier <[email-masked]>
Date: Fri, 25 Jul 2025 09:28:15 -0400

>> Thus electric-pair-mode doesn't violate any conventions.
> self-insert-command, called from Lisp, is broken.  There is no usable
> definition of its functionality.  So far, there is no competing analysis
> to mine as to how it's broken.  Stefan's "solution" is not to use
> self-insert-command.

Your code doesn't want to use `self-insert-command`, instead it wants to
do mimic `self-insert-command` but with some changes.
That's exactly what `post-self-insert-hook` is for.

> So it's looking like the ugly workarounds in c-electric-paren to use
> self-insert-command will have to remain.  I'm disappointed about this.

Not for lack of an alternative, tho.

        Stefan