(defun halve-other-window-height ()
"Expand current window to use half of the other window's lines."
(interactive)
(enlarge-window (/ (window-height (next-window)) 2)))
(global-set-key (kbd "C-c v") 'halve-other-window-height)
(defun run-scheme-here ()
"Run a new scheme process at the directory of the current buffer.
If a process is already running, switch to its buffer."
(interactive)
(let* ((proc (format "scheme: %s" default-directory))
(buf (format "*%s*" proc)))
(unless (comint-check-proc buf)
(let ((cmd (split-string scheme-program-name)))
(set-buffer
(apply 'make-comint-in-buffer proc buf (car cmd) nil (cdr cmd)))
(inferior-scheme-mode)
(buffer-resize)))
(pop-to-buffer buf)))