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: Eli Zaretskii
Subject: bug#71337: 30.0.50; `electric-pair-mode' and custom keybinding
Date: Tue, 04 Jun 2024 17:56:25 +0300

> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: bug-gnu-emacs@gnu.org,  João Távora
>  <joaotavora@gmail.com>,  Stefan
>  Monnier <monnier@iro.umontreal.ca>,  Arash Esbati <arash@gnu.org>,
>   71337@debbugs.gnu.org
> Date: Tue, 04 Jun 2024 12:09:09 +0200
> 
> > Which means the patch proposed by Stephen is not TRT, because it means
> > electric-pair-mode will ignore the inserted backslashes.
> 
> My patch should only make electric-pair-mode ignore key sequences which
> don't satisfy characterp, e.g. "s-#" or "C-#".  I just tested my patch
> after giving ?\ open parenthesis syntax, binding it to "C-#" and
> enabling electric-pair-mode, and what I see is that typing `C-#' inserts
> a "\" while typing `\' insert "\\".  Is this not the desired behavior?

No, I don't think it's the desired behavior.  A command that invokes
self-insert-command internally most probably expects all the side
effects of self-insert-command to happen as if the character was
actually typed.  Otherwise, why use self-insert-command instead of,
say, insert?





reply via email to

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