]> git.eshelyaron.com Git - emacs.git/commitdiff
(skeleton-internal-list, skeleton-internal-1):
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 17 Jan 2003 20:35:48 +0000 (20:35 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 17 Jan 2003 20:35:48 +0000 (20:35 +0000)
Don't treat \n specially in sub-skeletons.

lisp/skeleton.el

index 2b31194e7f1a6a5c0edd846b5d23503c37769ed0..05841a4dee1903a8c536e27c485b5fd037bdcb9a 100644 (file)
@@ -381,7 +381,7 @@ automatically, and you are prompted to fill in the variable parts.")))
         opoint)
     (or str
        (setq str `(setq str (skeleton-read ',(car skeleton) nil ,recursive))))
-    (when (and (eq (cadr skeleton) '\n)
+    (when (and (eq (cadr skeleton) '\n) (not recursive)
               (save-excursion (skip-chars-backward " \t") (bolp)))
       (setq skeleton (cons nil (cons '> (cddr skeleton)))))
     (while (setq skeleton-modified (eq opoint (point))
@@ -432,7 +432,7 @@ automatically, and you are prompted to fill in the variable parts.")))
        (indent-region (line-beginning-position)
                       (car skeleton-regions) nil))
        ;; \n as last element only inserts \n if not at eol.
-       ((and (null (cdr skeleton)) (eolp))
+       ((and (null (cdr skeleton)) (not recursive) (eolp))
        (if pos (indent-according-to-mode)))
        (skeleton-newline-indent-rigidly
        (let ((pt (point)))