From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#28627: 24.5; doc of `copy-sequence' Date: Wed, 27 Sep 2017 13:40:06 -0700 (PDT) Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1506544873 12576 195.159.176.226 (27 Sep 2017 20:41:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Sep 2017 20:41:13 +0000 (UTC) To: 28627@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 27 22:41:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJ8l-0002rJ-6q for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Sep 2017 22:41:07 +0200 Original-Received: from localhost ([::1]:56271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxJ8s-0000ca-Ej for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Sep 2017 16:41:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxJ8k-0000be-1q for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxJ8g-0003ZQ-4T for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:41:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55017) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxJ8g-0003ZL-0k for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dxJ8f-0001mK-Na for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Sep 2017 20:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28627 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15065448336791 (code B ref -1); Wed, 27 Sep 2017 20:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Sep 2017 20:40:33 +0000 Original-Received: from localhost ([127.0.0.1]:35465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJ8D-0001lS-HW for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:40:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJ8A-0001lB-FT for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:40:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxJ81-0003Bp-4H for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:40:25 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45547) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxJ81-0003Bg-0Y for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:40:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxJ7v-00006z-4M for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:40:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxJ7q-0002vf-Vm for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:40:15 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:17703) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxJ7q-0002ut-Mj for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 16:40:10 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v8RKe7Zq021752 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 27 Sep 2017 20:40:08 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v8RKe7ZT021897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 27 Sep 2017 20:40:07 GMT Original-Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v8RKe7PY025420 for ; Wed, 27 Sep 2017 20:40:07 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6776.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137518 Archived-At: This (doc string) is not true for an empty sequence: "Return a copy of a list, vector, string or char-table." This ((elisp) `Sequence Functions') is not true for an empty sequence: Storing a new element into the copy does not affect the original SEQUENCE, and vice versa. However, the elements of the new sequence are not copies; they are identical (eq) to the elements of the original. Therefore, changes made within these elements, as found via the copied sequence, are also visible in the original sequence. This has not been true for an empty string since Emacs 23. It is now the case, for instance that (eq foo bar) here returns t: (setq foo "" bar (copy-sequence foo)) (Before Emacs 23 it returned nil.) Similarly, for []. `copy-sequence' used to give you a new empty-vector object. Now it does not. (However, before those changes the same thing did hold for the empty list, (): copy-sequence did not return a new empty-list object.) The doc should make clear that there is only one empty-sequence object, for each type of sequence. In particular, `copy-sequence' does not create a new sequence object if the sequence is empty. In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D3D/c/usr --host=3D3Di686-pc-mingw32'