                               (message "Error: the content of the region failed to parse."))
                              (msg (message "Error: %s" (cdr msg)))
 			     (t
-			      (message "Unexpected error")))))))
+			      (message "Unexpected error"))))
+                     (funcall k))))
     (merlin--type-expression substring on-success on-error)))
 
 (defun merlin-type-expr (exp)


(defun merlin--type-expression (exp callback-if-success &optional callback-if-exn)
  "Get the type of EXP inside the local context."
  (if exp (merlin-send-command-async
           (list 'type 'expression (substring-no-properties exp)
                 'at (merlin-unmake-point (point)))
           callback-if-success callback-if-exn)))

(defun merlin--type-display-in-buffer (text)
  "Change content of type-buffer."

    (define-key merlin-map (kbd "C-c C-r") 'merlin-error-check)
    (define-key merlin-map (kbd "C-c TAB") 'merlin-try-completion)
    (define-key merlin-map (kbd "C-c C-t") 'merlin-type-enclosing)
    (define-key merlin-map (kbd "C-c C-n") 'merlin-phrase-next)
    (define-key merlin-map (kbd "C-c C-p") 'merlin-phrase-prev)
    (define-key merlin-menu-map [customize]
