anchor.diff:                                            nil))))
            (line-offset point 0 end))))))
   
  -(defun tm-find-ahead-results (results)
  -  (let ((min)
  -        (best))
  -    (loop :for result :in results
  -          :do (when (and result (or (null min) (> min (tm-result-start result))))
  -                (setf min (tm-result-start result))
  -                (setf best result)))
  -    best))
  -
  -(defun tm-recompute-results (results string i)
  -  (loop :for rest-results :on results
  -        :for result := (car rest-results)
  -        :do (when (and result
  -                       (>= i (tm-result-start result)))
  -              (let ((new-result
  -                     (tm-ahead-match (tm-result-syntax result)
  -                                     (tm-ahead-matcher (tm-result-syntax result))
  -                                     string
  -                                     i)))
  -                (setf (car rest-results)
  -                      new-result)))))
  -
   (defun tm-continue-prev-line (point)
     (let* ((line (point-line point))
            (prev (line-prev line))
  
positive.code: (defun tm-result-reg-starts (result) (aref result 3))
  (defun tm-result-reg-ends   (result) (aref result 4))
  
  (defun tm-apply-region (syntax point begin-result)
    (declare (type point point))
    (let ((end-result
           (tm-ahead-match syntax
                           (syntax-region-end syntax)
                           (line-string point)
                           (if begin-result
                               (tm-result-end begin-result)
                               0))))
      (cond (end-result
             (line-add-property (point-line point)
                                (if begin-result
                                    (tm-result-start begin-result)
                                    0)
                                (tm-result-end end-result)
                                :attribute (syntax-attribute syntax)
                                nil)
             (line-offset point 0 (tm-result-end end-result)))
            (t
             (line-add-property (point-line point)
                                (if begin-result
                                    (tm-result-start begin-result)
                                    0)
                                (line-length (point-line point))
                                :attribute (syntax-attribute syntax)
                                t)
             (set-syntax-context (point-line point) syntax)
             (line-end point)))))
  
  (defun tm-apply-result (point result)
    (let ((syntax (tm-result-syntax result)))
  
negative.code: (defun tm-syntax-scan-line (point)
    (tm-continue-prev-line point)
    (let ((results
           (tm-get-results-from-patterns (syntax-table-patterns (current-syntax))
                                         (line-string point)
                                         (point-charpos point))))
      (loop
        (let ((best (tm-best-result results)))
          (unless best (return))
          (tm-apply-result point best)
          (tm-recompute-results results
                                (line-string point)
                                (point-charpos point)))))
    (line-offset point 1))
  
  (defun tm-syntax-scan-region (start end)
  