(require 'cmuscheme) (defun cmb-restart-inferior-scheme () (interactive) (comint-send-eof) ; There is a race here. Without the sleep-for, the next scheme process ; never starts. (sleep-for 0 500) (call-interactively 'run-scheme) (message "restarted")) (define-key inferior-scheme-mode-map "\C-cr" 'cmb-restart-inferior-scheme)