Mark Triggs <[EMAIL PROTECTED]> writes:

>   (defun tla--gensym (&optional arg)
>     "Generate a new uninterned symbol.
>     The name is made by appending a number to PREFIX, default \"tla\"."
>     (let ((prefix (if (stringp arg) arg "tla"))
>           (num (if (integerp arg) arg
>                  (prog1
>                      tla--gensym-counter
>                    (setq tla--gensym-counter (1+ tla--gensym-counter))))))
>       (make-symbol (format "%s%d" prefix num))))
>
>
>   (defun tla--capturing-lambda-helper (l)
>     (cond ((atom l) l)
>           ((eq (car l) 'capture)
>            (let ((g (tla--gensym)))
>              (push (list g (cadr l)) captured-values)
>              g))
>           (t (mapcar 'tla--capturing-lambda-helper l))))

Actually, I wasn't quite thinking straight when I wrote this.  I think
if we use a `flet' for the tla--capturing-lambda-helper, we can use the
regular `gensym' from the CL package and avoid defining our own.  For
some reason I was thinking we should avoid `flet', but I think it should
be fine.

Mark

-- 
Mark Triggs
<[EMAIL PROTECTED]>

Reply via email to