[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: deep copy of an alist
From: |
Klaus Berndl |
Subject: |
Re: deep copy of an alist |
Date: |
20 Sep 2002 12:08:50 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
On Fri, 20 Sep 2002, Edward O'Connor wrote:
> >>>>> "Klaus" == Klaus Berndl <Klaus.Berndl@sdm.de> writes:
>
> Klaus> Is there a function which makes a deep copy of an alist.
> Klaus> AFAIK *copy-alist* makes no copies of the elements of the
> Klaus> alist, i.e. the cars and cdrs of an element are shared...
>
> Doesn't `copy-tree' do what you want?
Thanks. I must have been blind.... :-)
Ciao,
klaus
>
> ,----[ C-h f copy-tree RET ]
> | copy-tree is an alias for `cl-copy-tree' in `cl-extra'.
> | (copy-tree TREE &optional VECP)
> |
> | Make a copy of TREE.
> | If TREE is a cons cell, this recursively copies both its car and its cdr.
> | Contrast to copy-sequence, which copies only along the cdrs. With second
> | argument VECP, this copies vectors as well as conses.
> `----
>
>
> Ted
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220