ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   10 Symbols   10.2 Dictionary of Symbols

10.2.13 symbol-plist Accessor

symbol-plist symbol    plist

(setf (symbol-plist symbol) new-plist)

Arguments and Values:
symbol - a symbol.

plist, new-plist - a property list.

Accesses the property list of symbol.

 (setq sym (gensym))  #:G9723
 (symbol-plist sym)  ()
 (setf (get sym 'prop1) 'val1)   VAL1
 (symbol-plist sym)  (PROP1 VAL1)
 (setf (get sym 'prop2) 'val2)   VAL2
 (symbol-plist sym)  (PROP2 VAL2 PROP1 VAL1)
 (setf (symbol-plist sym) (list 'prop3 'val3))  (PROP3 VAL3)
 (symbol-plist sym)  (PROP3 VAL3)

Exceptional Situations:
Should signal an error of type type-error if symbol is not a symbol.

See Also:
get, remprop

The use of setf should be avoided, since a symbol's property list is a global resource that can contain information established and depended upon by unrelated programs in the same Lisp image.

Allegro CL Implementation Details:

Home Previous Up Next Table of Contents Index
© Franz Inc. 1998-2017 - File last updated 01-11-2017