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

[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 <address@hidden> 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: address@hidden
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


reply via email to

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