This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
emacs convenience
- To: kawa at sourceware dot cygnus dot com
- Subject: emacs convenience
- From: Luke Gorrie <luke at bluetail dot com>
- Date: 20 Apr 2000 14:04:10 +0200
Here's a little bit of elisp code to use instead of scheme-send-region
which turns newlines into spaces, so you don't get an *scheme* buffer
full of kawa prompts:
;; Replacement for scheme-send-region. strips out newlines
(defun scheme-send-region-no-newlines (start end)
"Send the current region, with newlines converted to spaces, to the
inferior Scheme process"
(interactive "r")
(comint-send-string
(scheme-proc)
(string-replace-match "\n" (buffer-substring start end) " " t t))
(comint-send-string (scheme-proc) "\n"))