 
 (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)
+(defun intero-repl-load (&optional prompt-options)
+  "Load the current file in the REPL, prompting with an options
+list if PROMPT-OPTIONS is t."
+  (interactive "P")
   (save-buffer)
   (let ((file (intero-buffer-file-name))
-        (repl-buffer (intero-repl-buffer)))
+        (repl-buffer (intero-repl-buffer prompt-options)))
     (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 ()
+(defun intero-repl (&optional prompt-options)
+  "Start up the REPL for this stack project, prompting with an
+options list if PROMPT-OPTIONS is t."
+  (interactive "P")
+  (switch-to-buffer (intero-repl-buffer prompt-options)))
+
+(defun intero-repl-buffer (prompt-options)
+  "Start the REPL buffer, prompting with an options list if
+PROMPT-OPTIONS is t."
   (let* ((root (intero-project-root))
          (package-name (intero-package-name))
          (name (format "*intero:%s:%s:repl*"

  :group 'intero
  :type 'string)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Modes


        (cd root)
        (intero-repl-mode)
        (intero-repl-mode-start backend-buffer
                                (buffer-local-value 'intero-targets backend-buffer)
                                prompt-options)
        (current-buffer)))))

(define-derived-mode intero-repl-mode comint-mode "Intero-REPL"
