From: Stefan Monnier Date: Thu, 17 Oct 2013 04:51:05 +0000 (-0400) Subject: * lisp/skeleton.el (skeleton-newline): Remove. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1236 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=921c1d62980fe93d4c26d6aeae0ef2a81a752b11;p=emacs.git * lisp/skeleton.el (skeleton-newline): Remove. (skeleton-internal-1): Use (insert "\n") instead. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f8636c8bd8..8dfd2553046 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-10-17 Stefan Monnier + * skeleton.el (skeleton-newline): Remove. + (skeleton-internal-1): Use (insert "\n") instead. + * emacs-lisp/lisp.el (lisp-completion-at-point): Complete var names for let-bindings. diff --git a/lisp/skeleton.el b/lisp/skeleton.el index a7eae7464e2..27b672c5552 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -356,15 +356,6 @@ automatically, and you are prompted to fill in the variable parts."))) (signal 'quit 'recursive) recursive)) -(defun skeleton-newline () - (if (or (eq (point) skeleton-point) - (eq (point) (car skeleton-positions))) - ;; If point is recorded, avoid `newline' since it may do things like - ;; strip trailing spaces, and since recorded points are commonly placed - ;; right after a trailing space, calling `newline' can destroy the - ;; position and renders the recorded position incorrect. - (insert "\n") - (newline))) (defun skeleton-internal-1 (element &optional literal recursive) (cond @@ -384,7 +375,7 @@ automatically, and you are prompted to fill in the variable parts."))) (let ((pos (if (eq element '>) (point)))) (cond ((and skeleton-regions (eq (nth 1 skeleton-il) '_)) - (or (eolp) (newline)) + (or (eolp) (insert "\n")) (if pos (save-excursion (goto-char pos) (indent-according-to-mode))) (indent-region (line-beginning-position) (car skeleton-regions) nil)) @@ -393,13 +384,13 @@ automatically, and you are prompted to fill in the variable parts."))) (if pos (indent-according-to-mode))) (skeleton-newline-indent-rigidly (let ((pt (point))) - (skeleton-newline) + (insert "\n") (indent-to (save-excursion (goto-char pt) (if pos (indent-according-to-mode)) (current-indentation))))) (t (if pos (reindent-then-newline-and-indent) - (skeleton-newline) + (insert "\n") (indent-according-to-mode)))))) ((eq element '>) (if (and skeleton-regions (eq (nth 1 skeleton-il) '_))