anchor.diff:  
   (defun mark-at-point-p (buffer mark)
     (mark-equal-p mark (buffer-point buffer)))
  +
  +(defun start-of-line-p (mark)
  +  (eql (mark-charpos mark) 0))
  +
  +(defun end-of-line-p (mark)
  +  (eql (mark-charpos mark) (line-length (mark-line mark))))
   
   ;;; Sub-editor. Buffer manipulation.
   
  
positive.code:     (incf (line-version current-line))
      ;; Update marks.
      (dolist (mark (line-mark-list current-line))
        (when (and (eql (mark-line mark) current-line)
                   (or (and (eql (mark-kind mark) :right)
                            (eql (mark-charpos mark) current-charpos))
                       (> (mark-charpos mark) current-charpos)))
          (incf (mark-charpos mark)))))
    (update-point-column-hint buffer)
    (values))
  
  (defun kill-line (buffer)
    "Kill from point to the end of the line. If the point is at the end of the line,
  then merge the current line and next line."
    (let* ((point (buffer-point buffer))
           (current-line (mark-line point))
           (current-charpos (mark-charpos point)))
      (cond ((eql (line-length current-line) current-charpos)
             ;; At end of line. Merge current line with next.
             (when (next-line current-line)
               (let ((next-line (next-line current-line))
                     (len (line-length current-line)))
                 ;; Update contents.
                 (adjust-array (data current-line)
                               (+ len
                                  (line-length next-line))
                               :fill-pointer t)
                 (replace (data current-line) (data next-line)
                          :start1 len)
                 ;; Unlink next line from the line list.
                 (cond ((next-line next-line)
                        (setf (previous-line (next-line next-line)) current-line))
                       (t (setf (last-line buffer) current-line)))
                 (setf (next-line current-line) (next-line next-line))
                 (setf (next-line next-line) nil
                       (previous-line next-line) nil
                       (line-buffer next-line) nil)
                 (incf (line-version next-line))
                 ;; Update marks. FIXME
                 #+(or)(dolist (mark (mark-list *editor*))
                   (when (eql (line mark) next-line)
                     (setf (line mark) current-line)
                     (incf (offset mark) (line-length current-line)))))))
            (t ;; At start or middle of line. Trim line.
             (setf (fill-pointer (data current-line)) current-charpos)
             ;; Update marks. FIXME
             #+(or)(dolist (mark (mark-list *editor*))
               (when (and (eql (line mark) current-line)
                          (> (offset mark) (line-length current-line)))
                 (setf (offset mark) (line-length current-line))))))
      (incf (line-version current-line)))
    (values))
  
  (defun delete-one-char-forward (buffer)
    (let* ((point (buffer-point buffer))
           (current-line (mark-line point))
           (current-charpos (mark-charpos point)))
      (cond ((eql current-charpos (line-length current-line))
             (kill-line buffer))
            (t
             (replace (data current-line) (data current-line)
                      :start1 current-charpos
                      :start2 (1+ current-charpos))
             (decf (fill-pointer (data current-line)))
             (incf (line-version current-line))
             ;; Update marks. FIXME
             #+(or)(dolist (mark (mark-list *editor*))
               (when (and (eql (line mark) current-line)
                          (> (offset mark) (point-offset *editor*)))
                 (decf (offset mark))))))))
  
  (defun delete-forward-char (buffer &optional (n 1))
    "Delete the following N characters (previous if N is negative)."
    (cond ((minusp n)
           (setf n (- n))
           (dotimes (i n)
             (when (and (eql (mark-line (buffer-point buffer)) (first-line buffer))
                        (eql (mark-charpos (buffer-point buffer)) 0))
               ;; At buffer start.
               (return))
             (backward-char buffer)
             (delete-one-char-forward buffer)))
          (t
           (dotimes (i n)
             (when (and (eql (mark-line (buffer-point buffer)) (last-line buffer))
                        (eql (mark-charpos (buffer-point buffer)) (line-length (last-line buffer))))
               ;; At buffer end.
               (return))
             (delete-one-char-forward buffer))))
    (values))
  
  (defun delete-backward-char (buffer &optional (n 1))
  
negative.code:              (#\Backspace (delete-backward-char buffer))
               (#\C-D (delete-forward-char buffer))
               (#\Delete (delete-forward-char buffer))
               (#\C-T (test-fill buffer))
               (#\C-W (kill-region buffer (buffer-point buffer) (buffer-mark buffer)))
               (#\C-Y (yank-region buffer))
               (t (cond ((find ch "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789!\"£$%^&*()_+-=[]{};'#:@~,./<>?`~|\\"
                               :test #'char=)
                         (insert-char buffer ch)))))
             (setf (pending-redisplay *editor*) (not (redisplay))))
         (error (c)
           (ignore-errors
  