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#33998: 27.0.50; cl-delete does not delete the first list element Date: Tue, 8 Jan 2019 10:45:50 -0800 (PST) Message-ID: References: <87muodud4d.fsf@aia00054aia.gr> <39367b1c-ea27-4627-99e3-eb7d0745c60f@default> 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 1546973113 20862 195.159.176.226 (8 Jan 2019 18:45:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2019 18:45:13 +0000 (UTC) Cc: 33998@debbugs.gnu.org, Deus Max To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 08 19:45:08 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggwN9-0005HH-RN for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Jan 2019 19:45:08 +0100 Original-Received: from localhost ([127.0.0.1]:42900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggwPG-00012C-Gi for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Jan 2019 13:47:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggwP5-00011N-5A for bug-gnu-emacs@gnu.org; Tue, 08 Jan 2019 13:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggwP4-0000os-Bu for bug-gnu-emacs@gnu.org; Tue, 08 Jan 2019 13:47:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggwP1-0000eg-1V for bug-gnu-emacs@gnu.org; Tue, 08 Jan 2019 13:47:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ggwOz-0003aN-K1 for bug-gnu-emacs@gnu.org; Tue, 08 Jan 2019 13:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Jan 2019 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33998 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 33998-submit@debbugs.gnu.org id=B33998.154697316213702 (code B ref 33998); Tue, 08 Jan 2019 18:47:01 +0000 Original-Received: (at 33998) by debbugs.gnu.org; 8 Jan 2019 18:46:02 +0000 Original-Received: from localhost ([127.0.0.1]:50248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggwO2-0003Yt-5O for submit@debbugs.gnu.org; Tue, 08 Jan 2019 13:46:02 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:44800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggwNz-0003YM-Ou for 33998@debbugs.gnu.org; Tue, 08 Jan 2019 13:46:00 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x08Ig7CV069827; Tue, 8 Jan 2019 18:45:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=w8FyaK0XXgIJ0idZIuD9dMUOiDwenneRh/OirCmoN6U=; b=sV1EAgqE2HjcRmdLrvxfHvG2RmDdMD20Ica4S4QZ5ganXwIlmoQZUspStNloLaMbNVaR IOgy42r1h8IVb3/f0Cup86IqqMZELoltmdc4bMoLPwwIh144LfFQblrmsQ0ZwX+wkRrA jZmUpkaiPRENBlrpnrGQiP3vBKOdwvMPhzyInRJfAl1n4JskLvHd55oSijD10Pagr+rb sgcMFqlvCheKm986Sh3depXJFzoa2Mdjmrv0eZ7epTAFEoEH9w4ARMHylEZeeg66hplc gpAVLKa3A7hRcUNCGt/2ADxTD3usU/3+02/eDdPisft52Q4IUSFrJootO0cYjdwb+Ty6 kw== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2ptm0u5ccg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 08 Jan 2019 18:45:53 +0000 Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x08Ijqss016541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Jan 2019 18:45:52 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x08IjpFj013465; Tue, 8 Jan 2019 18:45:51 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4783.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9130 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=574 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901080149 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: 209.51.188.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:154267 Archived-At: > > Again, you should set the variable to the value > > returned by `cl-delete' only if that's what you > > want >=20 > OK. Say you don't. Say you don't SETQ the variable > to the return value. What do you expect to be left > with in the value bound to the SEQ symbol? >=20 > > Pretty simple, really. >=20 > Then answer the pretty simple question above. Without setting variable `seq' (i.e., without the `setq'), that variable is still bound to whatever it was bound to prior to your invoking `(cl-delete thing seq)'. Presumably it was bound to a cons. It is still bound to that cons - the same (`eq') cons. `cl-delete' is not passed the variable. It is passed only its value. It can only act on that value. It can act on that cons. A function can change the car or cdr of a cons. A function cannot change which cons some variable points to, unless the function has access to that variable (not just its value). Whether the car or cdr of the cons passed to `cl-delete' is redirected, that has no effect on which cons is the value of variable `seq'.