From 8c2e462acc4dda7e0adf31538f1994bc12f5c4cb Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 20 Dec 2013 08:38:02 +0800 Subject: [PATCH] * skeleton.el (skeleton-pair-insert-maybe): Disable newline insertion using skeleton-end-newline. Fixes: debbugs:16138 --- lisp/ChangeLog | 5 +++++ lisp/skeleton.el | 5 +++-- 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 @@ +2013-12-20 Leo Liu + + * skeleton.el (skeleton-pair-insert-maybe): Disable newline + insertion using skeleton-end-newline. (Bug#16138) + 2013-12-20 Juri Linkov * 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." (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 -- 2.39.2