     (let ((start (point)))
       (skip-syntax-forward "w_.")
       (list start (point)
-            (apply-partially #'merlin--completion-table start)))))
+            (apply-partially #'merlin--completion-table start)
+            . (:exit-function #'merlin--completion-lookup)))))
+            
 
 (defvar merlin--completion-cache-state nil)
 (defvar merlin--completion-annotation-table nil

    (add-to-list 'ac-sources 'merlin-ac-source))
  (add-hook 'completion-at-point-functions
            #'merlin-completion-at-point nil 'local)
  (set (make-local-variable 'merlin-lock-point) (point-min))
  (set (make-local-variable 'merlin-buffer) nil)
  (set (make-local-variable 'merlin-result) nil)

            (run-with-idle-timer merlin-idle-delay t 'merlin-idle-hook)))
  (with-current-buffer merlin-type-buffer
    (funcall merlin-favourite-caml-mode)))

;;;###autoload
(define-minor-mode merlin-mode
  "Minor mode for interacting with a merlin process.
Runs a merlin process in the background (one for all merlin
