anchor.diff:                           (subseq (line-str line) pos)))))
     t)
   
  +(defun merge-plist (plist1 plist2)
  +  (let ((new-plist '()))
  +    (flet ((f (plist)
  +             (loop :for (k v) :on plist :by #'cddr
  +                   :do (setf (getf new-plist k)
  +                             (nconc (getf new-plist k) v)))))
  +      (f plist1)
  +      (f plist2))
  +    new-plist))
  +
   (defun buffer-delete-char (buffer linum pos n)
     (with-buffer-modify buffer
       (let ((line (buffer-get-line buffer linum))
             (del-lines (list "")))
         (setf (line-%scan-cached-p line) nil)
         (loop while (or (eq n t) (plusp n)) do
  +        (when (line-search-property-range line 'read-only pos (if (eq n t) nil (+ pos n)))
  +          (error 'readonly))
           (cond
             ((and (not (eq n t))
                   (<= n (- (length (line-str line)) pos)))
  
positive.code: (defun buffer-insert-line (buffer linum pos str)
    (with-buffer-modify buffer
      (let ((line (buffer-get-line buffer linum)))
        (setf (line-%scan-cached-p line) nil)
        (line-property-insert-pos line pos (length str))
        (with-push-undo (buffer)
  
negative.code:                  (concatenate 'string
                                (subseq (line-str line) 0 pos)
                                (line-str (line-next line))))
             (setf (line-plist line)
                   (merge-plist
                    (line-plist line)
                    (loop :for (key elements) :on (line-plist (line-next line)) :by #'cddr
                          :append (let ((new-elements
                                         (loop :for (start end value) :in elements
                                               :collect (list (+ start pos)
                                                              (+ end pos)
                                                              value))))
                                    (when new-elements
                                      (list key new-elements))))))
             (when (eq (line-next line)
                       (buffer-tail-line buffer))
               (setf (buffer-tail-line buffer) line))
  