summaryrefslogtreecommitdiff
path: root/lisp/skeleton.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2001-02-04 20:57:37 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2001-02-04 20:57:37 +0000
commit3bb34a0214262bb0b23f3373f0f9b4ba576a3c0b (patch)
tree0917fe7934933e067f6300600450ef3a7635dd1f /lisp/skeleton.el
parent02399da7a645b1aae59f863a43f82ee346a71797 (diff)
downloademacs-3bb34a0214262bb0b23f3373f0f9b4ba576a3c0b.tar.gz
Docstring fixes.
Diffstat (limited to 'lisp/skeleton.el')
-rw-r--r--lisp/skeleton.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 0733f065262..45a43ebbe5f 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -261,7 +261,7 @@ If ELEMENT is a string or a character it gets inserted (see also
`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 @@ If ELEMENT is a string or a character it gets inserted (see also
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 @@ automatically, and you are prompted to fill in the variable parts.")))
(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 @@ automatically, and you are prompted to fill in the variable parts.")))
(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))))