       (ignore-errors (kill-process merlin-process)))
     (unless merlin-debug (kill-buffer buffer))))
 
-(defun merlin--wait-for-answer (promise)
-  "Waits for merlin to answer."
-  (when promise
-    (let ((w32-pipe-read-delay 0)) ;; fix 50ms latency of emacs on win32
-      (while (not (car promise))
-        (accept-process-output (merlin-process) 1.0)))
-    (cdr promise)))
-
 (defun merlin--reset ()
   "Rewind the knowledge of merlin of the current buffer to zero."
   (let* ((name (or buffer-file-name "toplevel"))

  "Returns a pair of two string lists (dot_merlins . failures) with a list of
.merlins file loaded and a list of error messages, if any error occured during
loading"
  (let* ((r (merlin-send-command '(project get)))
         (failed (cdr (assoc 'failures r)))
         (result (cdr (assoc 'result r)))
         (ret (cons result failed)))
    (setq merlin--project-cache (cons (float-time) ret))
    ret))

(defun merlin--project-get-cached ()
  "Like `merlin--project-get' but use a cache to prevent to limit number of

(defvar merlin-process-queue nil
  "The transaction queue for the local process (only valid in a process buffer).")
(make-variable-buffer-local 'merlin-process-queue)

(defvar merlin--process-busy nil
  "Non-nil if process is busy treating a synchronous operation.")
(make-variable-buffer-local 'merlin--process-busy)

(defvar merlin-process-data nil
  "The process data (as returned by the grouping function) (only valid in a process buffer).")
