         (cd root)
         (intero-repl-mode)
         (intero-repl-mode-start backend-buffer
-                                (buffer-local-value 'intero-targets backend-buffer))
+                                (buffer-local-value 'intero-targets backend-buffer)
+                                prompt-options)
         (current-buffer)))))
 
 (define-derived-mode intero-repl-mode comint-mode "Intero-REPL"


(defconst intero-prompt-regexp "^\4 ")

(defun intero-repl-options ()
  "Open an option menu to set options used when starting the REPL."
  (interactive)
  (let* ((old-options
          (list
            (list :key "load-all"
                  :title "Load all modules"
                  :default (not intero-repl-no-load))
            (list :key "build-first"
                  :title "Build project first"
                  :default (not intero-repl-no-build))))
         (new-options (intero-multiswitch "REPL Options:" old-options)))
    (setq intero-repl-no-load (not (member "load-all" new-options)))
    (setq intero-repl-no-build (not (member "build-first" new-options)))))

(defun intero-repl-load ()
  "Load the current file in the REPL."
  (interactive)
  (save-buffer)
  (let ((file (intero-buffer-file-name))
        (repl-buffer (intero-repl-buffer)))
    (with-current-buffer repl-buffer
      (comint-send-string
       (get-buffer-process (current-buffer))
       (concat ":l " file "\n")))
    (pop-to-buffer repl-buffer)))

(defun intero-repl ()
  "Start up the REPL for this stack project."
  (interactive)
  (switch-to-buffer (intero-repl-buffer)))

(defun intero-repl-buffer ()
  (let* ((root (intero-project-root))
         (package-name (intero-package-name))
         (name (format "*intero:%s:%s:repl*"

        (when (process-live-p process)
          (set-process-query-on-exit-flag process nil)
          (message "Started Intero process for REPL."))))))

(defun intero-repl-options (backend-buffer)
  "Open an option menu to set options used when starting the
REPL, default options come from user customization and any
temporary changes in the BACKEND-BUFFER."
  (interactive)
  (let* ((old-options
          (list
            (list :key "load-all"
                  :title "Load all modules"
                  :default (not (buffer-local-value 'intero-repl-no-load backend-buffer)))
            (list :key "build-first"
                  :title "Build project first"
                  :default (not (buffer-local-value 'intero-repl-no-build backend-buffer)))))
         (new-options (intero-multiswitch "Start REPL with options:" old-options)))
    (with-current-buffer backend-buffer
      (setq intero-repl-no-load (not (member "load-all" new-options)))
      (setq intero-repl-no-build (not (member "build-first" new-options))))))

;; For live migration, remove later
(font-lock-remove-keywords
