Subject: bug#72437: Unexpected behavior when inserting with prefix arg in electric-pair-mode

From: Eli Zaretskii <[email-masked]>
Date: Sat, 03 Aug 2024 18:40:37 +0300

> From: Eshel Yaron <[email-masked]>
> Cc: Joseph Turner <[email-masked]>,  Stefan Monnier
>  <[email-masked]>,  [email-masked]
> Date: Sat, 03 Aug 2024 13:04:58 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > post-self-insert-hook for each of the ARG inserted characters.  OTOH,
> > to produce "{{}}" we'd probably need to rewrite the
> > electric-pair-mode's hook function, but I have no idea how to rewrite
> > it to do that.
> >
> > Stefan, any suggestions?
> 
> I'm no Stefan, but I took a quick stab at it.  The following diff
> teaches electric-pair-mode about numeric prefix arguments:

Thanks, but isn't it cleaner if we simply call the hook from cmds.c
the same number of times as we insert a character?