aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2013-12-20 08:38:02 +0800
committerLeo Liu2013-12-20 08:38:02 +0800
commit8c2e462acc4dda7e0adf31538f1994bc12f5c4cb (patch)
tree894b1b3dd659eadbb4186a6e6f5ad799f693448e
parent501158bcb9b5fb14e181aad75a9bb612a2cacff5 (diff)
downloademacs-8c2e462acc4dda7e0adf31538f1994bc12f5c4cb.tar.gz
emacs-8c2e462acc4dda7e0adf31538f1994bc12f5c4cb.zip
* skeleton.el (skeleton-pair-insert-maybe): Disable newline
insertion using skeleton-end-newline. Fixes: debbugs:16138
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/skeleton.el5
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d91dd13dd28..aabbeb31375 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-12-20 Leo Liu <sdl.web@gmail.com>
2
3 * skeleton.el (skeleton-pair-insert-maybe): Disable newline
4 insertion using skeleton-end-newline. (Bug#16138)
5
12013-12-20 Juri Linkov <juri@jurta.org> 62013-12-20 Juri Linkov <juri@jurta.org>
2 7
3 * replace.el (occur-engine): Use `add-face-text-property' 8 * replace.el (occur-engine): Use `add-face-text-property'
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 27b672c5552..ac6550efe1b 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -509,7 +509,6 @@ symmetrical ones, and the same character twice for the others."
509 (let* ((mark (and skeleton-autowrap 509 (let* ((mark (and skeleton-autowrap
510 (or (eq last-command 'mouse-drag-region) 510 (or (eq last-command 'mouse-drag-region)
511 (and transient-mark-mode mark-active)))) 511 (and transient-mark-mode mark-active))))
512 (skeleton-end-hook)
513 (char last-command-event) 512 (char last-command-event)
514 (skeleton (or (assq char skeleton-pair-alist) 513 (skeleton (or (assq char skeleton-pair-alist)
515 (assq char skeleton-pair-default-alist) 514 (assq char skeleton-pair-default-alist)
@@ -520,7 +519,9 @@ symmetrical ones, and the same character twice for the others."
520 (if (not skeleton-pair-on-word) (looking-at "\\w")) 519 (if (not skeleton-pair-on-word) (looking-at "\\w"))
521 (funcall skeleton-pair-filter-function)))) 520 (funcall skeleton-pair-filter-function))))
522 (self-insert-command (prefix-numeric-value arg)) 521 (self-insert-command (prefix-numeric-value arg))
523 (skeleton-insert (cons nil skeleton) (if mark -1)))))) 522 ;; Newlines not desirable for inserting pairs. See bug#16138.
523 (let ((skeleton-end-newline nil))
524 (skeleton-insert (cons nil skeleton) (if mark -1)))))))
524 525
525 526
526;; A more serious example can be found in sh-script.el 527;; A more serious example can be found in sh-script.el