       (delete-process (merlin-get-process))
       (cancel-timer merlin-idle-timer)
       (delete-overlay merlin-overlay)
+      (merlin-delete-error-overlays)
       (kill-buffer (merlin-make-buffer-name))
 )))

    (define-key map (kbd "C-c <C-return>") 'merlin-point)
    (define-key map (kbd "C-c C-t") 'merlin-show-type-of-point)
    (define-key map (kbd "C-c l") 'merlin-use)
    (define-key map (kbd "C-c C-r") 'merlin-rewind)
    (define-key map (kbd "RET") 'merlin-enter)
    map

with the current position where merlin stops. It updates the merlin state by doing two things:
- either retract merlin's knowledge if `point' < `merlin-lock-point'
- or send the region between `merlin-lock-point' and `point'"
  (merlin-delete-error-overlays)
  (setq merlin-lock-point (merlin-retract-to point))
  (merlin-tell-piece-split "struct" merlin-lock-point point)
  (merlin-flush-tell)
  (if (merlin-view-errors)
      (setq merlin-lock-point point)
    (let ((msg (current-message)))
      (setq merlin-lock-point (merlin-seek merlin-lock-point))
      (message msg)))
