bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71337: 30.0.50; `electric-pair-mode' and custom keybinding


From: Arash Esbati
Subject: bug#71337: 30.0.50; `electric-pair-mode' and custom keybinding
Date: Tue, 04 Jun 2024 14:33:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

> It looks like Arash made the mistake of being the first one, ever, of
> invoking self-insert-command from Lisp with 2nd arg non-nil, and
> turning on electric-pair-mode on top of that.

Sorry for that :-)

> When self-insert-command is called with 2 args, it uses the 2nd arg as
> the character to insert, but it does NOT overwrite last-command-event
> with that character.  So post-self-insert-hook sees the wrong event
> and rightfully barfs.

Maybe I missed something, but is there a canonical way to achieve what I
want?  Background is that on macOS with German keyboard layout, I have
to hit 'Shift-Option-7' for a backslash which really bugs me.

> I think internal_self_insert should overwrite last-command-event or
> something, if we want to support this kind of scenario.  Stefan, WDYT?

It seems I'm not the only one with this idea:

  https://medium.com/@chasinglogic/defying-your-keyboard-with-elisp-366ab9cec85c

So supporting this kind of scenario could make sense.

Best, Arash





reply via email to

[Prev in Thread] Current Thread [Next in Thread]