--- skeleton.el.orig Sat Jul 14 04:21:08 2001 +++ skeleton.el Wed May 7 08:56:30 2003 @@ -262,6 +262,8 @@ \\n go to next line and indent according to mode _ interesting point, interregion here + - interesting point, no interregion interaction, overrides + interesting point set by _ > indent line (or interregion if > _) according to major mode @ add position to `skeleton-positions' & do next ELEMENT iff previous moved point @@ -270,8 +272,8 @@ 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. +After termination, point will be positioned at the last occurrence of - +or at the first occurrence of _ 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 @@ -295,6 +297,13 @@ input initial input (string or cons with index) while reading str v1, v2 local variables for memorizing anything you want +Note that the internal skeleton processing modifies the first occurrence +of str in each skeleton into a lisp form to set str to the value of +`skeleton-read' called with the first skeleton list element. Thus, if +you intend to use the value of str in a complex lisp expression, it is +best to simply inert the value first and then use it in a quoted lisp +expression or one which returns nil (as in (progn (blah...) nil) ).. + When done with skeleton, but before going back to `_'-point call `skeleton-end-hook' if that is non-`nil'." (let ((skeleton-regions regions)) @@ -448,13 +457,14 @@ (end-of-line 0))) (or skeleton-point (setq skeleton-point (point))))) + ((eq element '-) + (setq skeleton-point (point))) ((eq element '&) (when skeleton-modified (pop skeleton))) ((eq element '|) (unless skeleton-modified (pop skeleton))) ((eq element '@) - (push (point) skeleton-positions) - (unless skeleton-point (setq skeleton-point (point)))) + (push (point) skeleton-positions)) ((eq 'quote (car-safe element)) (eval (nth 1 element))) ((or (stringp (car-safe element))