+(defun skelrc-expand-text (text)
+ "Return the result of expanding TEXT in the current context.
+
+The context is extended with any new associations formed during
+the expansion."
+ (let* ((alist skel-alist)
+ (expanded (with-temp-buffer
+ (let ((skel-alist alist))
+ (insert text)
+ (goto-char (point-min))
+ (skelrc-dribble "before: alist = `%s'" skel-alist)
+ (skel-do-fill-in)
+ (setq alist skel-alist)
+ (buffer-string)))))
+ (setq skel-alist alist)
+ expanded))
+