GNU bug report logs - #72437
Unexpected behavior when inserting with prefix arg in electric-pair-mode

Previous Next

Package: emacs;

Reported by: Joseph Turner <joseph <at> breatheoutbreathe.in>

Date: Sat, 3 Aug 2024 07:14:02 UTC

Severity: normal

Fixed in version 31.1

Done: Eshel Yaron <me <at> eshelyaron.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 72437 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 72437 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca,
 joseph <at> breatheoutbreathe.in
Subject: Re: bug#72437: Unexpected behavior when inserting with prefix arg
 in electric-pair-mode
Date: Sat, 03 Aug 2024 18:40:37 +0300
> From: Eshel Yaron <me <at> eshelyaron.com>
> Cc: Joseph Turner <joseph <at> breatheoutbreathe.in>,  Stefan Monnier
>  <monnier <at> iro.umontreal.ca>,  72437 <at> debbugs.gnu.org
> Date: Sat, 03 Aug 2024 13:04:58 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> 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?




This bug report was last modified 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.