help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binding question


From: Eric Abrahamsen
Subject: Re: binding question
Date: Sun, 06 Oct 2013 22:03:39 +0800
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Thien-Thi Nguyen <address@hidden> writes:

> () Eric Abrahamsen <address@hidden>
> () Sun, 06 Oct 2013 17:35:30 +0800
>
>    What's the best way of handling this?
>
> Check out ‘copy-tree’, e.g.:
>
>  (let ((list-template (copy-tree list-template)))
>    ...)
>
> See also:
>
>  http://www.emacswiki.org/emacs/ElispCookbook
>
> which compares ‘copy-sequence’ and ‘copy-tree’ in section "Copying".
>
> WRT, lexical vs dynamic binding, the code is written to assume dynamic
> binding, so you might want to explicitly set ‘lexical-binding’ to nil
> somewhere.

Thanks very much to both of you! Copying sounds like exactly what I
wanted.

I was sort of wondering if there was a one-size-fits-all solution that
would also work in future lexically-bound environments, but I guess that
really would require passing arguments.

Thanks again,
Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]