[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it safe to modify a property list directly with PLIST-PUT?
From: |
Teemu Likonen |
Subject: |
Re: Is it safe to modify a property list directly with PLIST-PUT? |
Date: |
Sun, 26 Jul 2009 19:58:42 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
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