anchor.diff:          (T stream)))
   
   (defun do-xp-printing (fn stream args)
  -  (let ((xp (get-pretty-print-stream stream))
  +  (let ((xp (make-instance 'xp-structure :base-stream stream))
           (*current-level* 0)
           (result nil))
       (catch 'line-limit-abbreviation-exit
  
positive.code:     (when (catch 'line-limit-abbreviation-exit
              (attempt-to-output xp nil T) nil)
        (attempt-to-output xp T T))
      (free-pretty-print-stream xp)
      result))
  
  (defun write+ (object xp)
  
negative.code: (defconstant +suffix-min-size+ 256)
  
  (defclass xp-structure (sys.gray:fundamental-character-output-stream)
    ;;The stream IO eventually goes to.
    ((base-stream :initarg :base-stream :accessor base-stream)
     ;;The line length to use for formatting.
     (linel :accessor linel)
     ;;If non-NIL the max number of lines to print.
     (line-limit :accessor line-limit)
     ;;number of next line to be printed.
     (line-no :accessor line-no)
     ;;NIL :UP :DOWN :CAP0 :CAP1 :CAPW
     (char-mode :accessor char-mode)
     ;;depth of nesting of ~(...~)
     (char-mode-counter :accessor char-mode-counter)
     ;;Number of logical blocks at QRIGHT that are started but not ended.
     (depth-in-blocks :accessor depth-in-blocks)
  
     ;;This stack is pushed and popped in accordance with the way blocks are
     ;;nested at the moment they are entered into the queue.  It contains the
     ;;following block specific value.
     ;;SECTION-START total position where the section (see AIM-1102)
     ;;that is rightmost in the queue started.
     (block-stack :accessor block-stack)
     (block-stack-ptr :accessor block-stack-ptr)
  
     ;;This is a vector of characters (eg a string) that builds up the
     ;;line images that will be printed out.  BUFFER-PTR is the
     ;;buffer position where the next character should be inserted in
  