summaryrefslogtreecommitdiff
path: root/lisp/skeleton.el
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2013-12-20 08:38:02 +0800
committerLeo Liu <sdl.web@gmail.com>2013-12-20 08:38:02 +0800
commit8c2e462acc4dda7e0adf31538f1994bc12f5c4cb (patch)
tree894b1b3dd659eadbb4186a6e6f5ad799f693448e /lisp/skeleton.el
parent501158bcb9b5fb14e181aad75a9bb612a2cacff5 (diff)
downloademacs-8c2e462acc4dda7e0adf31538f1994bc12f5c4cb.tar.gz
* skeleton.el (skeleton-pair-insert-maybe): Disable newline
insertion using skeleton-end-newline. Fixes: debbugs:16138
Diffstat (limited to 'lisp/skeleton.el')
-rw-r--r--lisp/skeleton.el5
1 files changed, 3 insertions, 2 deletions
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."
(let* ((mark (and skeleton-autowrap
(or (eq last-command 'mouse-drag-region)
(and transient-mark-mode mark-active))))
- (skeleton-end-hook)
(char last-command-event)
(skeleton (or (assq char skeleton-pair-alist)
(assq char skeleton-pair-default-alist)
@@ -520,7 +519,9 @@ symmetrical ones, and the same character twice for the others."
(if (not skeleton-pair-on-word) (looking-at "\\w"))
(funcall skeleton-pair-filter-function))))
(self-insert-command (prefix-numeric-value arg))
- (skeleton-insert (cons nil skeleton) (if mark -1))))))
+ ;; Newlines not desirable for inserting pairs. See bug#16138.
+ (let ((skeleton-end-newline nil))
+ (skeleton-insert (cons nil skeleton) (if mark -1)))))))
;; A more serious example can be found in sh-script.el