   "Start a new Geiser REPL."
   (interactive
    (list (geiser-repl--get-impl "Start Geiser for scheme implementation: ")))
-  (geiser-repl--start-repl impl nil))
+  (let ((buffer (current-buffer)))
+    (geiser-repl--start-repl impl nil)
+    (geiser-repl--maybe-remember-scm-buffer buffer)))
 
 (defalias 'geiser 'run-geiser)
 

  "Start a new Geiser REPL connected to a remote Scheme process."
  (interactive
   (list (geiser-repl--get-impl "Connect to Scheme implementation: ")))
  (geiser-repl--start-repl impl
                           (geiser-repl--read-address host port)))

(make-variable-buffer-local
 (defvar geiser-repl--last-scm-buffer nil))

(defun switch-to-geiser (&optional ask impl buffer)
  "Switch to running Geiser REPL.

          (repl (geiser-repl--switch-to-buffer repl))
          ((geiser-repl--remote-p) (geiser-connect impl))
          (t (run-geiser impl)))
    (geiser-repl--maybe-remember-scm-buffer buffer)))

(defun switch-to-geiser-module (&optional module buffer)
  "Switch to running Geiser REPL and try to enter a given module."
