   "Return the buffer name corresponding to the merlin instance NAME."
   (format " *merlin (%s)*" name))
 
-(defun merlin-process-buffer ()
+(defun merlin-process-buffer (&optional instance-name)
   "Return the process buffer of the current buffer."
-  (get-buffer (merlin-instance-buffer-name merlin-instance)))
-
-(defun merlin-process ()
+  (get-buffer (merlin-instance-buffer-name
+                (if instance-name instance-name merlin-instance))))
+
+(defun merlin-process (&optional instance-name)
   "Return the process of the current buffer."
-  (and (merlin-process-buffer)
-       (buffer-local-value 'merlin-process (merlin-process-buffer))))
-
-(defun merlin-process-owner ()
+  (and (merlin-process-buffer instance-name)
+       (buffer-local-value 'merlin-process (merlin-process-buffer instance-name))))
+
+(defun merlin-process-owner (&optional instance-name)
   "Return the last user of the process of the current buffer."
-  (buffer-local-value 'merlin-process-owner (merlin-process-buffer)))
+  (buffer-local-value 'merlin-process-owner (merlin-process-buffer instance-name)))
 
 (defun merlin-start-process (flags &optional configuration)
   "Start the merlin process by fetching the information inside CONFIGURATION. FLAGS contains the list of flags to give merlin.

  "Return whether the current buffer was the current user of the merlin process."
  (equal (merlin-process-owner) (buffer-name)))

(defun merlin-process-started-p (name)
  "Return non-nil if the merlin process for the instance NAME is already started."
  (get-buffer (merlin-instance-buffer-name name)))

(defun merlin-kill-process (&optional buffer)
  "Kill the merlin process inside BUFFER. If BUFFER is nil, use

         (instance (lookup-default 'name conf "default")))
    (setq merlin-instance instance)
    ; if there is not yet a merlin process
    (when (merlin-process-dead-p instance)
      (merlin-start-process merlin-default-flags conf))
    (when (and (fboundp 'auto-complete-mode)
               merlin-use-auto-complete-mode)
