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

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

bug#49518: 28.0.50; electric-pair-mode skip-self fails for single-quotes


From: Jim Porter
Subject: bug#49518: 28.0.50; electric-pair-mode skip-self fails for single-quotes in python-mode
Date: Sun, 11 Jul 2021 10:34:19 -0700

On Sun, Jul 11, 2021 at 1:11 AM Stephen Berman <stephen.berman@gmx.net> wrote:
>
> One thing that's kinda nice about the current behavior of typing
> single-quote in python-mode is that if you type it three times in a row
> you get '''|''', so it's ready for typing a multiple string.  This
> doesn't happen with double-quote, and after setting
> electric-pair-text-syntax-table to python-mode-syntax-table it doesn't
> happen any more with single-quote.

That's true, and I've been working on a patch to make that behavior
more robust. The code for that is in
`python-electric-pair-string-delimiter', but I think an improved
implementation of that would depend on how this bug is fixed. I have a
local patch that works for me, but it depends on the other
electric-pair settings I use, so it couldn't merge as-is.

In particular, it would need to take into account the various possible
settings for `electric-pair-skip-self', since with that set to nil,
I'd generally expect `python-electric-pair-string-delimiter' to be a
no-op (we should already have three quote characters after point, so
no need to insert more).





reply via email to

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