[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
These functions are useful for manipulating property lists that are stored in places other than symbols:
This returns the value of the property property stored in the property list plist. For example,
(plist-get '(foo 4) 'foo)
⇒ 4
(plist-get '(foo 4 bad) 'foo)
⇒ 4
(plist-get '(foo 4 bad) 'bar)
⇒ |
It accepts a malformed plist argument and always returns nil
if
property is not found in the plist. For example,
(plist-get '(foo 4 bad) 'bar) ⇒ nil |
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,
(setq my-plist '(bar t foo 4)) ⇒ (bar t foo 4) (setq my-plist (plist-put my-plist 'foo 69)) ⇒ (bar t foo 69) (setq my-plist (plist-put my-plist 'quux '(a))) ⇒ (bar t foo 69 quux (a)) |
You could define put
in terms of plist-put
as follows:
(defun put (symbol prop value) (setplist symbol (plist-put (symbol-plist symbol) prop value))) |
Like plist-get
except that it compares properties using equal
instead of eq
.
Like plist-put
except that it compares properties using equal
instead of eq
.
This returns non-nil
if plist contains the given
property. Unlike plist-get
, this allows you to distinguish
between a missing property and a property with the value nil
. The
value is actually the tail of plist whose car
is
property.
[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.