aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2011-11-09 10:10:25 -0500
committerStefan Monnier <[email protected]>2011-11-09 10:10:25 -0500
commit0c325082036f353caf94bcd5ef02baee9c81bdf7 (patch)
treead4caed84634902fdc8227f3bebfd450ea560712 /lisp
parent90132c14854a1b92cc2141ea2a863bc0cbdcfcff (diff)
* lisp/electric.el (electric-pair-post-self-insert-function): Let user
turn it off buffer-locally. Fixes: debbugs:9932
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/electric.el1
2 files changed, 4 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 83a2733685..8f00ef7077 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2011-11-09 Stefan Monnier <[email protected]>
+ * 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 26fba20ea1..3d7c1fd8ac 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)) ?\" ?\())