   "Overlays for the pending errors")
 (defvar merlin-completion-point nil
   "Stores the point of last completion (beginning of the prefix)")
+(defvar merlin-enclosing-overlay nil
+  "Stores the overlay during showing enclosing types")
+(defvar merlin-enclosing-types nil
+  "List containing the enclosing type")
+(defvar merlin-enclosing-offset nil
+  "Current offset in `merlin-enclosing-types'")
+
 (defvar merlin-idle-point nil
   "Position of the last time we printed the type of point")
 (defvar merlin-lock-point nil

    (set (make-local-variable 'merlin-overlay) nil)
    (set (make-local-variable 'merlin-prefix) nil)
    (set (make-local-variable 'merlin-error-prefix) nil)
    (setq ac-sources '(merlin-ac-source))
    (add-to-list 'after-change-functions 'merlin-edit)
    (set-process-query-on-exit-flag (merlin-get-process) nil)

    (define-key map (kbd "C-c C-x") 'merlin-next-error)
    (define-key map (kbd "C-c C-r") 'merlin-rewind)
    (define-key map (kbd "C-c C-u") 'merlin-refresh)
    (define-key map (kbd "C-c C-f <C-return>") 'merlin-type-enclosing)
    (define-key map (kbd "C-c C-f C-<up>") 'merlin-type-enclosing-go-up)
    (define-key map (kbd "C-c C-f C-<down>") 'merlin-type-enclosing-go-down)
    (define-key map (kbd "RET") 'merlin-enter)
    map
    ))
