From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [ELPA] New package: transient Date: Mon, 4 May 2020 09:04:06 -0700 (PDT) Message-ID: References: <87368npxw4.fsf@bernoul.li> <87v9ljo5d0.fsf@bernoul.li> <87ftcnxu5m.fsf@bernoul.li> <83y2qezlpd.fsf@gnu.org> <83tv12zjx1.fsf@gnu.org> <20200429101755.GF24737@tuxteam.de> <838sicw4do.fsf@gnu.org> <83zhaqu89z.fsf@gnu.org> <83sggiu2p9.fsf@gnu.org> <83r1w2u20y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="27255"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org, tomas@tuxteam.de, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 04 18:23:49 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVdsj-0006yz-1Y for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 18:23:49 +0200 Original-Received: from localhost ([::1]:56110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVdsi-0006u5-16 for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 12:23:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVdZq-0007UF-1G for emacs-devel@gnu.org; Mon, 04 May 2020 12:04:18 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:42468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVdZn-00076v-VI; Mon, 04 May 2020 12:04:17 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 044FtPsR150407; Mon, 4 May 2020 16:04:13 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-2020-01-29; bh=xw7Je/dm+i/GiV8yN4hmAGSvDDo2I4RDoE6OVtS2Ndc=; b=tbqgMyU64vA7uq90wrBcErm2+6XIbFvDglKNULBiQejDtSE+TFhuOkAimr59gPn3QkLN 7hlcP8a0NtY5HM9VcZJ025GkGBr4l2YC8KA50MxQDxq6sXFNoqijoXP/89vmKnESVmxW mIzbc/xYijiBQzzA748hBCQENRpJfYBR5CSPfrCMgStcvj02WXs7tHUbi67aUoy3rA+a X7K6eQ5oLTCldFmXW4h+O1lwEEs/yRGyiWSnJdshjrit7yGbNa00vDbr8pSoQ+1p31Hv HXFMcglZZRsrbOFoGsARoUJ8H/ybPl5tbSD5CN/vNKWuTw0KtQ0hlqo2Y18HP3BPq0Ml fQ== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 30s1gmynue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 May 2020 16:04:12 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 044FrKpM127678; Mon, 4 May 2020 16:04:11 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 30sjnb32xt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 May 2020 16:04:09 +0000 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 044G475q019690; Mon, 4 May 2020 16:04:07 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9610 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=543 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005040127 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9610 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=1 mlxscore=0 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=595 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005040127 Received-SPF: pass client-ip=156.151.31.85; envelope-from=drew.adams@oracle.com; helo=userp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 12:04:14 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248859 Archived-At: > > What's an alist? It's a list. What's a (true) > > list? It's a sequence. > > `copy-sequence' (aka `copy-seq') also copies an > > alist. >=20 > 'copy-sequence' is usually not an adequate way to copy an alist. > It copies the backbone but not the associations. > When you modify the associations -- which you presumably intend > to do -- the two copies will both be changed. >=20 > To copy an alist properly, you need to use 'copy-alist', > and that is why we added that function. Oh, right; forgot. Thx. (setq foo '((a . A))) ; foo is ((a . A)) (setq titi (copy-alist foo)) ; titi is ((a . A)) (setcdr (car titi) 'AA) ; titi is ((a . AA)) foo is still ((a . A)) (setq bar (copy-sequence foo)) ; bar is ((a . A)) (setcdr (car bar) 'AA) ; bar is ((a . AA)) foo is now ((a . AA))