Next: , Previous: , Up: Lists   [Contents][Index]


11.9 Property Lists

A property list (or plist) is another way of representing a mapping from keys to values. Instead of the list consisting of conses of a key and a value, the keys and values alternate as successive entries in the list. Thus, the association list

((a . 1) (b . 2) (c . 3))

has the equivalent property list form

(a 1 b 2 c 3)

Property lists are used to represent the properties associated with various sorts of objects, such as symbols, strings, frames, etc. The convention is that property lists can be modified in-place, while association lists generally are not.

Plists come in two varieties: normal plists, whose keys are compared with eq, and lax plists, whose keys are compared with equal,

Function: valid-plist-p plist

Given a plist, this function returns non-nil if its format is correct. If it returns nil, check-valid-plist will signal an error when given the plist; that means it’s a malformed or circular plist or has non-symbols as keywords.

Function: check-valid-plist plist

Given a plist, this function signals an error if there is anything wrong with it. This means that it’s a malformed or circular plist.


Next: , Previous: , Up: Lists   [Contents][Index]