diff options
| author | Stefan Monnier | 2011-11-09 10:10:25 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2011-11-09 10:10:25 -0500 |
| commit | 0c325082036f353caf94bcd5ef02baee9c81bdf7 (patch) | |
| tree | ad4caed84634902fdc8227f3bebfd450ea560712 | |
| parent | 90132c14854a1b92cc2141ea2a863bc0cbdcfcff (diff) | |
| download | emacs-0c325082036f353caf94bcd5ef02baee9c81bdf7.tar.gz emacs-0c325082036f353caf94bcd5ef02baee9c81bdf7.zip | |
* lisp/electric.el (electric-pair-post-self-insert-function): Let user
turn it off buffer-locally.
Fixes: debbugs:9932
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/electric.el | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 83a27336855..8f00ef70776 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-11-09 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2011-11-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * electric.el (electric-pair-post-self-insert-function): Let user | ||
| 4 | turn it off buffer-locally (bug#9932). | ||
| 5 | |||
| 3 | * progmodes/python.el (python-beginning-of-statement): | 6 | * progmodes/python.el (python-beginning-of-statement): |
| 4 | Rewrite (bug#2703). | 7 | Rewrite (bug#2703). |
| 5 | 8 | ||
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." | |||
| 284 | 284 | ||
| 285 | (defun electric-pair-post-self-insert-function () | 285 | (defun electric-pair-post-self-insert-function () |
| 286 | (let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check. | 286 | (let* ((syntax (and (eq (char-before) last-command-event) ; Sanity check. |
| 287 | electric-pair-mode | ||
| 287 | (let ((x (assq last-command-event electric-pair-pairs))) | 288 | (let ((x (assq last-command-event electric-pair-pairs))) |
| 288 | (cond | 289 | (cond |
| 289 | (x (if (eq (car x) (cdr x)) ?\" ?\()) | 290 | (x (if (eq (car x) (cdr x)) ?\" ?\()) |