When you expand a tempo template with ON-REGION (C-u) then if the template uses 'r functionality i.e. something like: (tempo-define-template "example" '("repeated value first=" (r "value " value) "second=" (s value) "]\n")) r doesn't save anything in value so the second expansion is empty. This patch saves the active region as value so it can be used later in the template. I haven't written much lisp before so it may need some tidying up. Barney