aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorJoão Távora2014-04-07 00:23:45 +0100
committerJoão Távora2014-04-07 00:23:45 +0100
commit7aecc2f6ca3842395436f111449dbdcdce494ad5 (patch)
treec78d04a004e0e1185e78fb4fbe36f4729d8641e8 /lisp/progmodes/python.el
parent89f20f76d8fa700d2a534834bf178ac8796d35cf (diff)
downloademacs-7aecc2f6ca3842395436f111449dbdcdce494ad5.tar.gz
emacs-7aecc2f6ca3842395436f111449dbdcdce494ad5.zip
Fix triple-quoting electricity in python-mode
* lisp/progmodes/python.el (python-electric-pair-string-delimiter): Fix triple-quoting electricity. * test/automated/python-tests.el (python-triple-quote-pairing): New test. (python-syntax-after-python-backspace): New test. Fixes: debbugs:17192
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index b0102c55ffd..240cf8aff8c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3651,8 +3651,9 @@ returned as is."
3651 (let ((count 0)) 3651 (let ((count 0))
3652 (while (eq (char-before (- (point) count)) last-command-event) 3652 (while (eq (char-before (- (point) count)) last-command-event)
3653 (cl-incf count)) 3653 (cl-incf count))
3654 (= count 3))) 3654 (= count 3))
3655 (save-excursion (insert (make-string 3 last-command-event))))) 3655 (eq (char-after) last-command-event))
3656 (save-excursion (insert (make-string 2 last-command-event)))))
3656 3657
3657(defvar electric-indent-inhibit) 3658(defvar electric-indent-inhibit)
3658 3659