anchor.diff:                                      stream)
     (declare (ignore stream))
     ()) ; Nothing to do (?)
  +
  ++
  +;;; Item list formatting
  +
  +(define-protocol-class item-list-output-record ()
  +  ())
  +
  +(defgeneric map-over-item-cells (function item-list-record)
  +  (:documentation "Applies FUNCTION to the cells in ITEM-LIST-RECORD,
  +skipping skip over intervening non-table output record
  +structure. FUNCTION is a function of one argument, an output record
  +corresponding to a cell in the item list; it has dynamic extent."))
  +(defgeneric adjust-item-list-cells (item-list-record stream))
  +
  +(defclass standard-item-list-output-record (item-list-output-record
  +                                            standard-sequence-output-record)
  +  ((x-spacing :initarg :x-spacing)
  +   (y-spacing :initarg :y-spacing)
  +   (initial-spacing :initarg :initial-spacing)
  +   (row-wise :initarg :row-wise)
  +   (n-rows :initarg :n-rows)
  +   (n-columns :initarg :n-columns)
  +   (max-width :initarg :max-width)
  +   (max-height :initarg :max-height)))
  +
  +(defmethod map-over-item-cells
  +    (function (item-list-record standard-item-list-output-record))
  +  (map-over-output-records
  +   (lambda (record)
  +     (when (cell-output-record-p record) (funcall function record)))
  +   item-list-record))
  +
  +(defmethod adjust-item-list-cells
  +    ((item-list standard-item-list-output-record) stream)
  +  (let ((width 0) (height 0)
  +        (n-rows (slot-value item-list 'n-rows))
  +        (n-columns (slot-value item-list 'n-columns))
  +        x (y 0)
  +        dx dy
  +        (n-items 0)
  +        n-rows-left)
  +    (map-over-item-cells
  +     (lambda (item)
  +       (maxf width (bounding-rectangle-width item))
  +       (maxf height (bounding-rectangle-height item))
  +       (incf n-items))
  +     item-list)
  +    (when (and n-rows n-columns (> n-items (* n-rows n-columns)))
  +      (setq n-rows nil))
  +    (cond ((not (or n-rows n-columns))
  +           (setq n-rows n-items
  +                 n-columns 1))
  +          ((not n-rows)
  +           (setq n-rows (ceiling n-items n-columns)))
  +          ((not n-columns)
  +           (setq n-columns (ceiling n-items n-rows))))
  +    (setq x (if (slot-value item-list 'initial-spacing)
  +                (/ (slot-value item-list 'x-spacing) 2)
  +                0))
  +    (setq dx (+ width (slot-value item-list 'x-spacing)))
  +    (setq dy (+ height (slot-value item-list 'y-spacing)))
  +    (setq n-rows-left n-rows)
  +    (map-over-item-cells
  +     (lambda (item)
  +       (adjust-cell* item x y width height)
  +       (cond ((= 0 (decf n-rows-left))
  +              (setq x (+ x dx)
  +                    y 0
  +                    n-rows-left n-rows))
  +             (t (incf y dy))))
  +     item-list)))
  +
  +(defun format-items (items
  +                     &key stream printer presentation-type
  +                     x-spacing y-spacing n-columns n-rows
  +                     max-width max-height cell-align-x cell-align-y
  +                     initial-spacing (row-wise t) (move-cursor t)
  +                     record-type)
  +  (orf stream *standard-output*)
  +  (setq x-spacing (parse-space stream (or x-spacing #\Space) :horizontal))
  +  (setq y-spacing (parse-space stream (or y-spacing
  +                                          (stream-vertical-spacing stream))
  +                               :vertical))
  +  (orf record-type 'standard-item-list-output-record)
  +  (let ((printer (if printer
  +                     (if presentation-type
  +                         (lambda (item stream)
  +                           (with-output-as-presentation (stream item presentation-type)
  +                             (funcall printer item stream)))
  +                         printer)
  +                     (if presentation-type
  +                         (lambda (item stream)
  +                           (present item presentation-type :stream stream))
  +                         #'prin1))))
  +    (with-new-output-record
  +        (stream record-type item-list
  +                :x-spacing x-spacing
  +                :y-spacing y-spacing
  +                :initial-spacing initial-spacing
  +                :row-wise row-wise
  +                :n-rows n-rows
  +                :n-columns n-columns
  +                :max-width max-width
  +                :max-height max-height)
  +      (multiple-value-bind (cursor-old-x cursor-old-y)
  +          (stream-cursor-position stream)
  +        (with-output-recording-options (stream :record t :draw nil)
  +          (mapc (lambda (item)
  +                  (formatting-cell (stream :align-x cell-align-x
  +                                           :align-y cell-align-y)
  +                    (funcall printer item stream)))
  +                items)
  +          (finish-output stream))
  +        (adjust-item-list-cells item-list stream)
  +        (setf (output-record-position item-list)
  +              (values cursor-old-x cursor-old-y))
  +        (if move-cursor
  +            ;; FIXME!!!
  +            #+ignore
  +            (setf (stream-cursor-position stream)
  +                  (values cursor-new-x cursor-new-y))
  +            #-ignore
  +            nil
  +            (setf (stream-cursor-position stream)
  +                  (values cursor-old-x cursor-old-y)))
  +        (replay item-list stream)))))
  +
  +(defmacro formatting-item-list
  +    ((&optional stream
  +                &key x-spacing y-spacing n-columns n-rows
  +                stream-width stream-height
  +                max-width max-height
  +                initial-spacing (row-wise t) (move-cursor t)
  +                record-type &allow-other-keys)
  +     &body body)
  +  ())
positive.code: ;;; STANDARD-CELL-OUTPUT-RECORD class
  (defclass standard-cell-output-record (cell-output-record
                                         standard-sequence-output-record)
    ((align-x :initarg :align-x :reader cell-align-x)
     (align-y :initarg :align-y :reader cell-align-y)
     (min-width :initarg :min-width :reader cell-min-width)
     (min-height :initarg :min-height :reader cell-min-height)))
  
  (defmacro formatting-cell ((&optional (stream t)
                              &key (align-x :left) (align-y :center) ; FIXME!!! It must be :baseline, but it is not yet implemented
                                   min-width min-height
                                   (record-type ''standard-cell-output-record))
                             &body body)
  
negative.code: (defmethod map-over-column-cells
      (function (column-record standard-column-output-record))
    (map-over-output-records
     (lambda (record)
       (when (cell-output-record-p record) (funcall function record)))
     column-record))
  
  (defmacro formatting-column ((&optional (stream t)
  