Previous: , Up: Symbols   [Contents][Index]


13.4 Symbol Properties

A property list (plist for short) is a list of paired elements, often stored in the property list cell of a symbol. Each of the pairs associates a property name (usually a symbol) with a property or value. Property lists are generally used to record information about a symbol, such as its documentation as a variable, the name of the file where it was defined, or perhaps even the grammatical class of the symbol (representing a word) in a language-understanding system.

Some objects which are not symbols also have property lists associated with them, and SXEmacs provides a full complement of functions for working with property lists. See Property Lists.

The property names and values in a property list can be any Lisp objects, but the names are usually symbols. They are compared using eq. Here is an example of a property list, found on the symbol progn when the compiler is loaded:

(lisp-indent-function 0 byte-compile byte-compile-progn)

Here lisp-indent-function and byte-compile are property names, and the other two elements are the corresponding values.