 (defvar merlin-position-stack nil)
 
 ;; Misc
-(defvar merlin-project-file nil
-  "The .merlin file for current buffer.")
-(make-variable-buffer-local 'merlin-project-file)
-
+(defvar merlin-last-project-failures nil
+  "When loading .merlin, list of errors reported. Only update error messages if
+  error list changes")
+(make-variable-buffer-local 'merlin-last-project-failures)
 
 ;;;;;;;;;;;
 ;; UTILS ;;

  (when (get-buffer (merlin-process-buffer))
    (ignore-errors (merlin-kill-process)))
  (merlin-start-process merlin-default-flags (funcall merlin-grouping-function))
  (setq merlin-pending-errors nil)
  (merlin-load-project-file))

(defun merlin-list-instances ()
  "Return the list of instances currently started."

      (add-to-list 'ac-sources 'merlin-ac-source))
    (add-hook 'completion-at-point-functions
              #'merlin-completion-at-point nil 'local)
    (add-to-list 'after-change-functions 'merlin-sync-edit)))

(defun merlin-can-handle-buffer ()
  "Simple sanity check (used to avoid running merlin on, e.g., completion buffer)."
