Finally, the random insertion bug is nailed to the wall. I think. The
problem was that skel-lookup wasn't saving match-data in the right
place. In fact, it's not its job at all, and skel-do-fill-in ought to
do it, dammit.
(let ((pair (assq name skel-alist))
value)
(if pair
- (save-match-data (setq value (eval (cdr pair))))
+ (setq value (eval (cdr pair)))
(setq value (read-string (format "Value for %s: " name)))
(setq skel-alist (cons (cons name value) skel-alist)))
value))
buffer at this point."
(if (re-search-forward "\\[\\[\\([^]]*\\)\\]\\]" nil t)
(progn
- (replace-match (skel-lookup (match-string 1)) t t nil)
+ (replace-match (save-match-data
+ (skel-lookup (match-string 1)))
+ t t nil)
(goto-char (match-beginning 0))
(skel-do-fill-in))))