     (set (make-local-variable 'merlin-idle-point) nil)
     (set (make-local-variable 'merlin-completion-point) nil)
     (set (make-local-variable 'merlin-ready) nil)
+    (set (make-local-variable 'merlin-pending-errors) nil)
+    (set (make-local-variable 'merlin-pending-errors-overlay) nil)
     (set (make-local-variable 'merlin-overlay) nil)
     (set (make-local-variable 'merlin-prefix) nil)
     (set (make-local-variable 'merlin-error-prefix) nil)

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'"
  (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)))

    (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-x") 'merlin-next-error)
    (define-key map (kbd "C-c C-r") 'merlin-rewind)
    (define-key map (kbd "RET") 'merlin-enter)
    map
