   (interactive)
   (if (merlin-process-dead-p)
       (let* ((command (concat (merlin-command) " -version"))
-             (version (shell-command-to-string version))
+             (version (shell-command-to-string command))
              (version (replace-regexp-in-string "\n$" "" version)))
         (message "%s (from shell)" version))
     (message "%s" (merlin-send-command '(version)))))


(defun merlin-process-dead-p ()
  "Return non-nil if merlin process is dead."
  (and (merlin-process)
       (not (equal (process-status (merlin-process)) 'run))))

(defun merlin-lighter ()
  "Return the lighter for merlin which indicates the status of merlin process."


(defun merlin-process ()
  "Return the process of the current buffer."
  (and (merlin-process-buffer)
       (buffer-local-value 'merlin-process (merlin-process-buffer))))

(defun merlin-process-owner ()
  "Return the last user of the process of the current buffer."
