From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: plist-put: destructive? Date: Sat, 21 Jan 2017 11:25:38 +0100 Message-ID: <20170121102538.GA16743@tuxteam.de> References: <87mvelzgrr.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed X-Trace: blaine.gmane.org 1484994398 1432 195.159.176.226 (21 Jan 2017 10:26:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2017 10:26:38 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 21 11:26:35 2017 Return-path: Envelope-to: geh-help-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 1cUssP-00083d-CF for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jan 2017 11:26:29 +0100 Original-Received: from localhost ([::1]:59497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUssU-0005b3-Cb for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jan 2017 05:26:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUsrp-0005ZX-7I for help-gnu-emacs@gnu.org; Sat, 21 Jan 2017 05:25:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUsrj-0006MY-NS for help-gnu-emacs@gnu.org; Sat, 21 Jan 2017 05:25:53 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:36965 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cUsrj-0006L3-GV for help-gnu-emacs@gnu.org; Sat, 21 Jan 2017 05:25:47 -0500 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1cUsra-0004NK-7I for help-gnu-emacs@gnu.org; Sat, 21 Jan 2017 11:25:38 +0100 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112136 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Jan 20, 2017 at 10:25:27PM -0500, Stefan Monnier wrote: > > So what's the ambiguity? Are there circumstances where a simple > > plist-put isn't going to modify the original plist? > > Yes, when the plist is empty. > BTW, in recent Emacsen, you can use > > (setf (alist-get K AL) V) Now that's deliciously nifty :-) Thanks for the reminder - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAliDNyIACgkQBcgs9XrR2kZ2hQCfZS84VePEE6ZIizJC4vE8ZYZh w4IAn1pBRlrUvAOpaEmLYZNvZlgv5JAt =qwjk -----END PGP SIGNATURE-----