anchor.diff:          (leftover-index (- index)))
       (declare (type list lists-to-append)
                (type fixnum leftover-index))
  -    (loop named listwalker
  -       for string of-type simple-string in (multi-buffer-pstrings buffer)
  +    (loop for string of-type simple-string in (multi-buffer-pstrings buffer)
          for stringlength = (length (the simple-string string))
          if (> stringlength leftover-index)
          do (progn (push leftover-index lists-to-append)
                (decf leftover-index stringlength))
          else
  -       do (return-from listwalker
  -            (apply #'concatenate 'string (nreverse (cons (subseq string (- stringlength leftover-index))
  -                                                         (nreverse lists-to-append))))))))
  +       do (return-from previous-buffer-content-from-index
  +            (the simple-string
  +              (apply #'concatenate 'string (nreverse (cons (subseq string (- stringlength leftover-index))
  +                                                           (nreverse lists-to-append))))))))
  +  "") ; here to make sbcl's type system happy (case shouldn't occur)
   
   (defun char-for-index (buffer index callback)
     "yields the character of <buffer> at <index>"
  
positive.code:                  (1+ (multi-buffer-index buffer))))
          ((and (< (multi-buffer-mark buffer) 0)
              (>= (multi-buffer-index buffer) 0))
           (concatenate 'string
                        (previous-buffer-content-from-index buffer (multi-buffer-mark buffer))
                        (subseq (multi-buffer-string buffer) 0 (1+ (multi-buffer-index buffer)))))
          (T ; both are negative
           (let ((upto-mark (previous-buffer-content-from-index buffer (multi-buffer-mark buffer))))
             (declare (type simple-string upto-mark))
  
negative.code:                    `(defun ,(first stage) (,parser-state-var)
                        (declare (type parser-state ,parser-state-var)
                                 (ignorable ,parser-state-var))
                        (let ((,header-info-var (parser-state-header-info ,parser-state-var))
                              (,buffer-var (parser-state-buffer ,parser-state-var)))
                          (declare (ignorable ,header-info-var ,buffer-var)
                                   (type header-info ,header-info-var)
                                   (type multi-buffer ,buffer-var))
                         ,@(rest stage))))
                   stages))))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;
  