Mercurial > emacs
changeset 35879:1b871d9c3be4
Docstring fixes.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 04 Feb 2001 20:57:37 +0000 |
parents | ff00d6410f39 |
children | 9842097dff82 |
files | lisp/skeleton.el |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/skeleton.el Sun Feb 04 20:46:51 2001 +0000 +++ b/lisp/skeleton.el Sun Feb 04 20:57:37 2001 +0000 @@ -261,7 +261,7 @@ `skeleton-transformation'). Other possibilities are: \\n go to next line and indent according to mode - _ interesting point, interregion here, point after termination + _ interesting point, interregion here > indent line (or interregion if > _) according to major mode @ add position to `skeleton-positions' & do next ELEMENT if previous moved point @@ -270,6 +270,9 @@ resume: skipped, continue here if quit is signaled nil skipped +After termination, point will be positioned at the first occurrence +of _ or @ or at the end of the inserted text. + Further elements can be defined via `skeleton-further-elements'. ELEMENT may itself be a SKELETON with an INTERACTOR. The user is prompted repeatedly for different inputs. The SKELETON is processed as often as the user enters a @@ -425,6 +428,7 @@ (or (eolp) (newline)) (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)) nil) (skeleton-newline-indent-rigidly (indent-to (prog1 (current-indentation) (newline)))) @@ -445,11 +449,9 @@ (or skeleton-point (setq skeleton-point (point))))) ((eq element '&) - (if skeleton-modified - (setq skeleton (cdr skeleton)))) + (when skeleton-modified (pop skeleton))) ((eq element '|) - (or skeleton-modified - (setq skeleton (cdr skeleton)))) + (unless skeleton-modified (pop skeleton))) ((eq element '@) (push (point) skeleton-positions) (unless skeleton-point (setq skeleton-point (point))))