Fix a small bug in electric quoting.
commitf07c325d1f49e4b722f76aa730ac5d084bd0e77a
authorPhilipp Stephani <phst@google.com>
Sun, 31 Dec 2017 17:05:03 +0000 (31 18:05 +0100)
committerPhilipp Stephani <phst@google.com>
Sun, 7 Jan 2018 12:50:03 +0000 (7 13:50 +0100)
tree99369fe6c5f1a252e856dac51c64dc4a4ee71b92
parent151496a4b96430924bc148f85b9c8471d1e132b1
Fix a small bug in electric quoting.

Before this commit, if 'electric-quote-replace-double' is non-nil,
typing " '" turned into " ‘" even if
'electric-quote-context-sensitive' was nil.

* lisp/electric.el (electric-quote-post-self-insert-function): Insert
context-sensitive double quote only if the last character is actually
a double quote character.

* test/lisp/electric-tests.el
(electric-quote-replace-double-no-context-single): New unit test.
lisp/electric.el
test/lisp/electric-tests.el