type-specifier—a type specifier.
function—a function, a function name, or
The default is
table—a pprint dispatch table.
The default is the value of
Installs an entry into the pprint dispatch table which is table.
is the key
of the entry. The first action of
set-pprint-dispatch is to remove any
pre-existing entry associated with type-specifier. This guarantees that
there will never be two entries associated with the same type specifier
in a given pprint dispatch table. Equality of type specifiers is
Two values are associated with each type specifier in a
pprint dispatch table: a function and a priority.
The function must accept two arguments: the stream to which output
is sent and the object to be printed. The function should
pretty print the object to the stream. The function
can assume that object satisfies the type given by type-specifier.
The function must obey
Any values returned by the function are ignored.
Priority is a priority to resolve conflicts when an object matches more than one entry.
It is permissible for function to be
nil. In this situation,
there will be no type-specifier entry in table after
An error is signaled if priority is not a real.
Since pprint dispatch tables are often used to control the pretty printing of Lisp code, it is common for the type-specifier to be an expression of the form
(cons car-type cdr-type)
This signifies that the corresponding object must be a cons cell whose car matches the type specifier car-type and whose cdr matches the type specifier cdr-type. The cdr-type can be omitted in which case it defaults to t.