 			 (merlin-get-process-buffer-name)
 			 merlin-command flags) )
         (name (buffer-name)))
+    (set (make-local-variable 'merlin-local-process) p)
     (merlin-debug (format "Running %s with flags %s\n" merlin-command flags))
 ;; set the global process (for now)
-    (set (make-local-variable 'merlin-local-process) p)
     (set-process-query-on-exit-flag p nil)
     (set-process-filter p 'merlin-filter)
     (push p merlin-processes)

    (if merlin-debug (merlin-debug (format "Sending:\n%s\n---\n" string)))
    (with-current-buffer (merlin-get-process-buffer-name)
      (setq merlin-process-last-user name)
      (merlin-wait-for-answer)
      merlin-result
      )
))


(defun merlin-is-long (s)

          (message "%s" (cdr (assoc 'message err)))))
    (next-error)))

(defun merlin-remove-error-overlay ()
  "Remove the error overlay."
  (delete-overlay merlin-error-overlay))

