 (defun merlin-type-enclosing-go-up ()
   "Go up in the enclosing type zipper."
   (interactive)
-  (if merlin-enclosing-types
-      (if (> merlin-enclosing-offset (length merlin-enclosing-types))
-          (message "cannot go up")
-        (progn
-          (setq merlin-enclosing-offset (+ 1 merlin-enclosing-offset))
-          (merlin-type-enclosing-go)
-          ))))
+  (when merlin-enclosing-types
+    (setq merlin-enclosing-offset (+ 1 merlin-enclosing-offset))
+    (if (> merlin-enclosing-offset (1- (length merlin-enclosing-types)))
+        (message "cannot go up")
+      (progn
+        (merlin-type-enclosing-go)
+        ))))
 
 (defun merlin-type-enclosing-go-down ()
   "Go down in the enclosing type zipper."

    (if (not end-p)
        (merlin-send-command "tell" '("end" nil)))
    (if view-errors-p
        (merlin-check-for-errors view-errors-p)
      (progn
        (merlin-seek orig-point))
        (merlin-check-for-errors view-errors-p)
        (merlin-seek (point) "end"))
    (setq merlin-lock-point (merlin-get-position))
    (merlin-update-lock-zone-display)))


                    (exit-function . merlin-completion-lookup))))
    (unless (and merlin-completion-annotation-table
                 (eq (car merlin-completion-cache-state) start)
                 (string-equal (merlin-compute-prefix string)
                               (merlin-compute-prefix (cdr merlin-completion-cache-state))))
      (save-excursion
        (goto-char start)
        (setq merlin-lock-point (merlin-retract-to (point))))
      (save-excursion
        (with-merlin-sync
         (setq merlin-completion-annotation-table
               (mapcar #'(lambda (a)
                           (cons (car a) (concat ": " (cadr a))))
                       (merlin-completion-data string)))
         (goto-char start)))
      (setq merlin-completion-cache-state (cons start string)))
    (complete-with-action action merlin-completion-annotation-table string pred)))


