# HG changeset patch # User Richard M. Stallman # Date 851801477 0 # Node ID 6d837bb21c557a4e6f6056aad8cd83204f357f01 # Parent beb94a5271e29a8abc00795c231586eba861b3ba (skeleton-marks): New variable. (skeleton-insert, skeleton-internal-1): Set skeleton-marks. diff -r beb94a5271e2 -r 6d837bb21c55 lisp/skeleton.el --- a/lisp/skeleton.el Sat Dec 28 02:53:04 1996 +0000 +++ b/lisp/skeleton.el Sat Dec 28 19:31:17 1996 +0000 @@ -100,6 +100,11 @@ (defvar skeleton-debug nil "*If non-nil `define-skeleton' will override previous definition.") +(defvar skeleton-marks nil + "Variable used to keep the list of positions marked with @ after +skeleton insertion. The list is in the reverse order of the insertion +order. This list is reseted before skeleton insertion.") + ;; reduce the number of compiler warnings (defvar skeleton) (defvar skeleton-modified) @@ -250,6 +255,7 @@ \\n go to next line and indent according to mode _ interesting point, interregion here, point after termination > indent line (or interregion if > _) according to major mode + @ add position to `skeleton-marks' & do next ELEMENT if previous moved point | do next ELEMENT if previous didn't move point -num delete num preceding characters (see `skeleton-untabify') @@ -299,6 +305,7 @@ (setq skeleton-regions (cdr skeleton-regions))) (let ((beg (point)) skeleton-modified skeleton-point resume: help input v1 v2) + (setq skeleton-marks nil) (unwind-protect (eval `(let ,skeleton-further-elements (skeleton-internal-list skeleton str))) @@ -431,6 +438,8 @@ ((eq element '|) (or skeleton-modified (setq skeleton (cdr skeleton)))) + ((eq element '@) + (setq skeleton-marks (cons (point) skeleton-marks))) ((eq 'quote (car-safe element)) (eval (nth 1 element))) ((or (stringp (car-safe element))