pprint-fill
stream object {&optional colon-p at-sign-p} => nil
pprint-linear
stream object {&optional colon-p at-sign-p} => nil
pprint-tabular
stream object {&optional colon-p at-sign-p tabsize} => nil
stream---an output stream designator.
object---an object.
colon-p---a generalized boolean. The default is true.
at-sign-p---a generalized boolean. The default is implementation-dependent.
tabsize---a non-negative integer. The default is 16.
The functions pprint-fill, pprint-linear, and pprint-tabular specify particular ways of pretty printing a list to stream. Each function prints parentheses around the output if and only if colon-p is true. Each function ignores its at-sign-p argument. (Both arguments are included even though only one is needed so that these functions can be used via ~/.../ and as set-pprint-dispatch functions, as well as directly.) Each function handles abbreviation and the detection of circularity and sharing correctly, and uses write to print object when it is a non-list.
If object is a list and if the value of *print-pretty* is false, each of these functions prints object using a minimum of whitespace, as described in section Printing Lists and Conses. Otherwise (if object is a list and if the value of *print-pretty* is true):
Evaluating the following with a line length of 25 produces the output shown.
(progn (princ "Roads ") (pprint-tabular *standard-output* '(elm main maple center) nil nil 8)) Roads ELM MAIN MAPLE CENTER
Performs output to the indicated stream.
The cursor position on the indicated stream, if it can be determined.
The function pprint-tabular could be defined as follows:
(defun pprint-tabular (s list &optional (colon-p t) at-sign-p (tabsize nil)) (declare (ignore at-sign-p)) (when (null tabsize) (setq tabsize 16)) (pprint-logical-block (s list :prefix (if colon-p "(" "") :suffix (if colon-p ")" "")) (pprint-exit-if-list-exhausted) (loop (write (pprint-pop) :stream s) (pprint-exit-if-list-exhausted) (write-char #\Space s) (pprint-tab :section-relative 0 tabsize s) (pprint-newline :fill s))))
Note that it would have been inconvenient to specify this function using format, because of the need to pass its tabsize argument through to a ~:T format directive nested within an iteration over a list.
Go to the first, previous, next, last section, table of contents.