From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: Is it safe to modify a property list directly with PLIST-PUT? Date: Sun, 26 Jul 2009 19:58:42 +0300 Organization: A noiseless patient Spider Message-ID: <87bpn7wfct.fsf@iki.fi> References: <87ab2rs8kv.fsf@iki.fi> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248630109 10030 80.91.229.12 (26 Jul 2009 17:41:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Jul 2009 17:41:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 26 19:41:42 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 1MV7jC-0006Iv-5E for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Jul 2009 19:41:42 +0200 Original-Received: from localhost ([127.0.0.1]:51749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MV7jB-0003xQ-BD for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Jul 2009 13:41:41 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!feeder.eternal-september.org!eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-X-Trace: news.eternal-september.org U2FsdGVkX19Glt9rBryLXWfID4U+wndI1sdcwPS3JYOsRRbETpcxE+Qpll5/Ru10q9HUQIhMlLC3V2/3BItNKa9wBGQP6SteWUraXyUCcVfNuVUDrr4Pa6fBGVTmYSmCANuOGLbpN3mvP7R4K4Ilfj6aF9dFkPPq Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Sun, 26 Jul 2009 17:05:39 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+45MvG62MFGNUZXKsM2u6Yru3ecTr2ufbJe6ihWOy9YA== Cancel-Lock: sha1:z/c22MH2ss9OggUxl7PQRmeCgHU= sha1:PCn16Xfq6WbejK/X9vRtt7h/7ko= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:171209 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:66399 Archived-At: On 2009-07-26 19:38 (+0300), Teemu Likonen wrote: > ((:foo "one" :bar "two") > (:foo "three" :bar "New value")) > The question: Is this reliable? Is it guaranteed that it will always > modify the list correctly? If not, how would you suggest doing it > instead? Ah, Emacs Lisp manual effectively says that it's not guaranteed. So, what would be the best way to modify single values in a list like the above? -- Function: plist-put plist property value This stores VALUE as the value of the PROPERTY property in the property list PLIST. It may modify PLIST destructively, or it may construct a new list structure without altering the old. The function returns the modified property list, so you can store that back in the place where you got PLIST. For example, (elisp) Other Plists