1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

(skeleton-internal-list, skeleton-internal-1):

Don't treat \n specially in sub-skeletons.
This commit is contained in:
Stefan Monnier 2003-01-17 20:35:48 +00:00
parent 3f4a4bdf31
commit da8249b4a9

View 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)))