From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: plist-put modification by side effect Date: Sun, 01 Feb 2009 00:02:42 +0100 Message-ID: <87d4e3w031.fsf@ambire.localdomain> References: <20090131210630.GC17573@stats.ox.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233443217 24981 80.91.229.12 (31 Jan 2009 23:06:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2009 23:06:57 +0000 (UTC) To: help-gnu-emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 01 00:08:11 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LTOwd-0004ab-I3 for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Feb 2009 00:08:11 +0100 Original-Received: from localhost ([127.0.0.1]:40329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTOvL-0006fD-4H for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Jan 2009 18:06:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LTOv5-0006f4-FR for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 18:06:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LTOv3-0006er-J2 for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 18:06:35 -0500 Original-Received: from [199.232.76.173] (port=46556 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTOv3-0006eo-FD for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 18:06:33 -0500 Original-Received: from smtp-out26.alice.it ([85.33.2.26]:1925) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LTOv3-00037q-0P for help-gnu-emacs@gnu.org; Sat, 31 Jan 2009 18:06:33 -0500 Original-Received: from FBCMMO02.fbc.local ([192.168.68.196]) by smtp-out26.alice.it with Microsoft SMTPSVC(6.0.3790.1830); Sun, 1 Feb 2009 00:06:33 +0100 Original-Received: from FBCMCL01B06.fbc.local ([192.168.69.87]) by FBCMMO02.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Sun, 1 Feb 2009 00:06:33 +0100 Original-Received: from ambire.localdomain ([79.24.51.48]) by FBCMCL01B06.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Sun, 1 Feb 2009 00:06:28 +0100 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1LTOrL-0003mu-0e for help-gnu-emacs@gnu.org; Sun, 01 Feb 2009 00:02:43 +0100 In-Reply-To: <20090131210630.GC17573@stats.ox.ac.uk> (Dan Davison's message of "Sat, 31 Jan 2009 16:06:30 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-OriginalArrivalTime: 31 Jan 2009 23:06:28.0627 (UTC) FILETIME=[8C54DE30:01C983F8] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61809 Archived-At: () Dan Davison () Sat, 31 Jan 2009 16:06:30 -0500 I don't get this. It says the plist is altered by side effects. So what's with the "but just to be extra careful use (setq ...)" advice? If PROP is in PLIST, the natural side-effecting operation is to splice in the VALUE at the position of the old value. Ok, fine. Now, what if PROP is not in PLIST? How might you implement that? How might you implement that, differently? How might your design decision surprise the unwary caller? thi