aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
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
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')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/python.el5
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7d6436cfafc..c30c02dcef3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,9 +1,14 @@
12014-04-06 João Távora <joaotavora@gmail.com> 12014-04-06 João Távora <joaotavora@gmail.com>
2 2
3 * progmodes/python.el (python-electric-pair-string-delimiter): Fix
4 triple-quoting electricity. (Bug#17192)
5
62014-04-06 João Távora <joaotavora@gmail.com>
7
3 * elec-pair.el (electric-pair-post-self-insert-function): Don't 8 * elec-pair.el (electric-pair-post-self-insert-function): Don't
4 skip whitespace when `electric-pair-text-pairs' and 9 skip whitespace when `electric-pair-text-pairs' and
5 `electric-pair-pairs' were used. syntax to 10 `electric-pair-pairs' were used. syntax to
6 electric-pair--skip-whitespace. (Bug#17183) 11 electric-pair--skip-whitespace. (Bug#17183)
7 12
82014-04-06 Eli Zaretskii <eliz@gnu.org> 132014-04-06 Eli Zaretskii <eliz@gnu.org>
9 14
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