From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: Re: binding question
Date: Sun, 06 Oct 2013 22:03:39 +0800 [thread overview]
Message-ID: <874n8usdhg.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 87fvse1zb1.fsf@zigzag.favinet
Thien-Thi Nguyen <ttn@gnu.org> writes:
> () Eric Abrahamsen <eric@ericabrahamsen.net>
> () 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
next prev parent reply other threads:[~2013-10-06 14:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-06 9:35 binding question Eric Abrahamsen
2013-10-06 10:14 ` Thien-Thi Nguyen
2013-10-06 14:03 ` Eric Abrahamsen [this message]
2013-10-06 14:45 ` Stefan Monnier
2013-10-06 12:39 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874n8usdhg.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.