     (merlin-check-synchronize)
     (if (equal point (merlin-goto-phrase "current" 0))
         (merlin-goto-phrase "prev" 0))))
+(defun merlin-prev-phrase-or-go-up ()
+  (interactive)
+  (if (equal merlin-last-point-type (point))
+      (merlin-type-enclosing-go-up)
+    (merlin-prev-phrase)))
 
 (defun merlin-to-point ()
   "Update the merlin to the current point, reporting error."

          (elt
           (merlin-send-command "type" (list "enclosing" (merlin-unmake-point (point))))
           1))))
    (setq merlin-enclosing-types list)
    (setq merlin-enclosing-offset -1)))


  (if (not (merlin-goto-phrase "next" 0)) ;; no next phrase => end-of-buffer
      (goto-char (point-max))))

(defun merlin-next-phrase-or-go-down ()
  (interactive)
  (if (equal merlin-last-point-type (point))
      (merlin-type-enclosing-go-down)
    (merlin-next-phrase)))

(defun merlin-prev-phrase ()
  "Go to the beginning of the previous phrase."
  (interactive)
