In case of an error Gambit and Guile automatically enter a debugger. In order to leave the debugger it is
necessary to press Ctrl-d, which sends the Unicode character 'End of Transmission' (ASCII 0x04 EOT) to the
Scheme process. It is necessary to switch buffers for this, becuse "C-d" has a different meaning in the
scheme-mode
. The following definition extends the scheme-mode by adding the key binding "C-c C-d", which
sends EOT to Scheme process.
(defun scheme-send-end-of-transmission ()
"Send Unicode 'End of Transmussion' to the Scheme process."
(interactive)
(comint-send-string (scheme-proc) "\N{End of Transmission}"))
(add-hook 'scheme-mode-hook
(lambda ()
(local-set-key (kbd "C-c C-d")
#'scheme-send-end-of-transmission)))