anchor.diff:                         :attribute content-name
                          contp)))
   
  -(defun tm-apply-region (rule point begin-result end)
  -  (let ((start1 (if begin-result (tm-result-start begin-result) 0))
  -        (start2 (if begin-result (tm-result-end begin-result) 0)))
  +(defun tm-apply-region (rule point begin-result start end)
  +  (let ((start1 (or start (tm-result-start begin-result)))
  +        (start2 (or start (tm-result-end begin-result))))
       (let ((end-result
              (tm-ahead-match rule (tm-region-end rule) (line-string point) start2 end)))
         (multiple-value-bind (best results)
  
positive.code:                                     :attribute (tm-rule-name rule)
                                      t)
                   (tm-apply-content-name rule point start2 (line-length (point-line point)) t)
                   (set-syntax-context (point-line point) rule)
                   (line-end point)
                   (return))
                  ((and best end-result (tm-result= best end-result))
  
negative.code:   (let ((rule (tm-result-rule result)))
      (etypecase rule
        (tm-region
         (tm-apply-region rule point result nil end))
        (tm-match
         (tm-apply-match rule point result)))))
  
  (defun tm-continue-prev-line (point)
    (let* ((line (point-line point))
           (prev (line-prev line))
           (context (and prev (get-syntax-context prev)))
           (rule (if (consp context) (car context) context)))
      (cond ((null rule)
             (set-syntax-context line nil))
            ((typep rule 'tm-region)
             (tm-apply-region rule point
                              (when (consp context) (cdr context))
                              0 nil))
            ((typep rule 'tm-rule)
             (cond ((eq (get-syntax-context line) 'end-move-action)
                    (with-point ((p point))
                      (previous-single-property-change p :attribute)
                      (let ((goal (tm-move-action rule p t)))
                        (when goal
                          (move-point point goal)))))
                   (t
                    (line-add-property (point-line point)
                                       0 (line-length line)
                                       :attribute (tm-rule-name rule)
                                       t)
                    (line-end point))))
            (t
  