                   geiser-impl--implementation)
              (geiser-repl--read-impl
               "Scheme implementation: "))))
-  (geiser-repl--start-repl impl t))
+  (geiser-repl--start-repl impl t host port))
 
 (make-variable-buffer-local
  (defvar geiser-repl--last-scm-buffer nil))

  "Switch to running Geiser REPL and try to enter a given module."
  (interactive)
  (let* ((module (or module
                     (geiser-completion--read-module "Switch to module: ")))
         (cmd (and module
                   (geiser-repl--enter-cmd geiser-impl--implementation
                                           module))))

(defsubst geiser-repl--port () (cdr geiser-repl--address))
(defsubst geiser-repl--remote-p () geiser-repl--address)

(defun geiser-repl--get-address (&optional host port)
  (let ((defhost (or (geiser-repl--host) geiser-repl-default-host))
        (defport (or (geiser-repl--port) geiser-repl-default-port)))
    (cons (or host
              (read-string (format "Host (default %s): " defhost)
                           nil nil defhost))
          (or port (read-number "Port: " defport)))))

(defun geiser-repl--save-remote-data (remote address)
  (setq geiser-repl--address (and remote address))
