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

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

bug#23387: 25.0.93; Unicode quote inserted in Python mode outside of str


From: Philipp Stephani
Subject: bug#23387: 25.0.93; Unicode quote inserted in Python mode outside of strings
Date: Tue, 03 May 2016 20:44:27 +0000



Paul Eggert <address@hidden> schrieb am Mo., 2. Mai 2016 um 18:05 Uhr:
Thanks for the bug report and patch, but I ran into a problem with the
patch. Suppose I do this:

emacs -Q
M-x electric-quote-mode
M-x customize-variable RET electric-quote-string, set it to t, save
M-x python-mode
'abc'

That is, I type apostrophe-a-b-c-apostrophe in Python mode. With the
patch, the buffer will contain:

'abc’

The opening apostrophe is OK, but the closing apostrophe is considered
to be inside a string so it is transmogrified into a right single
quotation mark. A Python programmer would want both to be apostrophes.

I'm not sure, I think if a user has electric-quote-string enabled, that's the behavior they want, because it's inside a string. However, I can see that both approaches are valid. There is probably no good way that would work in all circumstances.

reply via email to

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