From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 72437@debbugs.gnu.org, monnier@iro.umontreal.ca,
joseph@breatheoutbreathe.in
Subject: bug#72437: Unexpected behavior when inserting with prefix arg in electric-pair-mode
Date: Sat, 03 Aug 2024 20:18:06 +0200 [thread overview]
Message-ID: <m14j8131y9.fsf@dazzs-mbp.home> (raw)
In-Reply-To: <86a5htvclm.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Aug 2024 18:40:37 +0300")
Hi Eli,
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Eshel Yaron <me@eshelyaron.com>
>> Cc: Joseph Turner <joseph@breatheoutbreathe.in>, Stefan Monnier
>> <monnier@iro.umontreal.ca>, 72437@debbugs.gnu.org
>> Date: Sat, 03 Aug 2024 13:04:58 +0200
>>
>> Eli Zaretskii <eliz@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?
Interesting, it might work for electric-pair-mode, though I suspect that
not all functions that people put on post-self-insert-hook are prepared
to be invoked repeatedly following a single self-insert-command.
next prev parent reply other threads:[~2024-08-03 18:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-03 7:12 bug#72437: Unexpected behavior when inserting with prefix arg in electric-pair-mode Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-03 9:12 ` Eli Zaretskii
2024-08-03 11:04 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-03 15:40 ` Eli Zaretskii
2024-08-03 18:18 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-08-03 18:46 ` Eli Zaretskii
2024-08-14 1:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-14 5:07 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-14 11:39 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-17 6:28 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-19 5:14 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-14 0:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-16 21:22 ` João Távora
2024-08-17 6:08 ` Eli Zaretskii
2024-08-17 9:30 ` João Távora
2024-08-17 14:03 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-17 14:21 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m14j8131y9.fsf@dazzs-mbp.home \
--to=bug-gnu-emacs@gnu.org \
--cc=72437@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joseph@breatheoutbreathe.in \
--cc=me@eshelyaron.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.