aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/electric.el11
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fb1eae49dba..15ed6d89943 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12012-07-14 Chong Yidong <cyd@gnu.org> 12012-07-14 Chong Yidong <cyd@gnu.org>
2 2
3 * electric.el (electric-pair-post-self-insert-function): Fix pair
4 insertion in empty-region case (Bug#11520).
5
62012-07-14 Chong Yidong <cyd@gnu.org>
7
3 * bindings.el: Consolidate ctl-x-r-map bindings. Bind 8 * bindings.el: Consolidate ctl-x-r-map bindings. Bind
4 copy-rectangle-as-kill to C-x r w. 9 copy-rectangle-as-kill to C-x r w.
5 10
diff --git a/lisp/electric.el b/lisp/electric.el
index 5f1445577e9..3108a0ed4c0 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -322,12 +322,13 @@ This can be convenient for people who find it easier to hit ) than C-f."
322 ((and (memq syntax '(?\( ?\" ?\$)) (use-region-p)) 322 ((and (memq syntax '(?\( ?\" ?\$)) (use-region-p))
323 (if (> (mark) (point)) 323 (if (> (mark) (point))
324 (goto-char (mark)) 324 (goto-char (mark))
325 ;; We already inserted the open-paren but at the end of the region, 325 ;; We already inserted the open-paren but at the end of the
326 ;; so we have to remove it and start over. 326 ;; region, so we have to remove it and start over.
327 (delete-char -1) 327 (delete-char -1)
328 (save-excursion 328 (save-excursion
329 (goto-char (mark)) 329 (goto-char (mark))
330 (insert last-command-event))) 330 ;; Do not insert after `save-excursion' marker (Bug#11520).
331 (insert-before-markers last-command-event)))
331 (insert closer)) 332 (insert closer))
332 ;; Backslash-escaped: no pairing, no skipping. 333 ;; Backslash-escaped: no pairing, no skipping.
333 ((save-excursion 334 ((save-excursion