From: Stefan Monnier Date: Wed, 9 Nov 2011 15:10:25 +0000 (-0500) Subject: * lisp/electric.el (electric-pair-post-self-insert-function): Let user X-Git-Tag: emacs-pretest-24.0.92~121^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c325082036f353caf94bcd5ef02baee9c81bdf7;p=emacs.git * lisp/electric.el (electric-pair-post-self-insert-function): Let user turn it off buffer-locally. Fixes: debbugs:9932 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 83a27336855..8f00ef70776 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-11-09 Stefan Monnier + * 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). diff --git a/lisp/electric.el b/lisp/electric.el index 26fba20ea12..3d7c1fd8ac4 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -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)) ?\" ?\())