* lisp/electric.el (electric-pair-post-self-insert-function): Let user

turn it off buffer-locally.

Fixes: debbugs:9932
This commit is contained in:
Stefan Monnier 2011-11-09 10:10:25 -05:00
parent 90132c1485
commit 0c32508203
2 changed files with 4 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2011-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
* electric.el (electric-pair-post-self-insert-function): Let user
turn it off buffer-locally (bug#9932).
* progmodes/python.el (python-beginning-of-statement):
Rewrite (bug#2703).

View file

@ -284,6 +284,7 @@ This can be convenient for people who find it easier to hit ) than C-f."
(defun electric-pair-post-self-insert-function ()
(let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check.
electric-pair-mode
(let ((x (assq last-command-event electric-pair-pairs)))
(cond
(x (if (eq (car x) (cdr x)) ?\" ?\())