summaryrefslogtreecommitdiff
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
parent501158bcb9b5fb14e181aad75a9bb612a2cacff5 (diff)
downloademacs-8c2e462acc4dda7e0adf31538f1994bc12f5c4cb.tar.gz
* 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 @@
+2013-12-20 Leo Liu <sdl.web@gmail.com>
+
+ * skeleton.el (skeleton-pair-insert-maybe): Disable newline
+ insertion using skeleton-end-newline. (Bug#16138)
+
2013-12-20 Juri Linkov <juri@jurta.org>
* 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