GNU bug report logs - #64960
Documentation for copy-sequence

Previous Next

Package: emacs;

Reported by: uzibalqa <uzibalqa <at> proton.me>

Date: Sun, 30 Jul 2023 16:43:01 UTC

Severity: minor

Fixed in version 29.2

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: uzibalqa <uzibalqa <at> proton.me>
Cc: 64960 <at> debbugs.gnu.org
Subject: bug#64960: Documentation for copy-sequence
Date: Mon, 31 Jul 2023 05:21:44 +0300
> Date: Sun, 30 Jul 2023 19:20:45 +0000
> From: uzibalqa <uzibalqa <at> proton.me>
> Cc: 64960 <at> debbugs.gnu.org
> 
> > As the doc string says: the elements are not copied. You get a new
> > sequence whose elements are shared with the original one.
> 
> So it returns a copy but elements are not copied.  So what happens exactly ?
> You get a reference to the original ?

Yes.

> When I modify the copy, the original remains intact.

No, if you modify an element of the copy, the corresponding element of
the original is also changed.  That's what "shared" means.




This bug report was last modified 1 year and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.