Scheme 编程环境的设置
http://www.yinwang.org/blog-cn/2013/04/11/scheme-setup/
sudo apt-get insatll racket
;;paredit-mode
(autoload 'paredit-mode "paredit"
"Minor mode for pseudo-structurally editing Lisp code."
t) ;;;;;;;;;;;;
;; Scheme
;;;;;;;;;;;; (require 'cmuscheme)
(setq scheme-program-name "racket") ;; 如果用 Petite 就改成 "petite" ;; bypass the interactive question and start the default interpreter
(defun scheme-proc ()
"Return the current Scheme process, starting one if necessary."
(unless (and scheme-buffer
(get-buffer scheme-buffer)
(comint-check-proc scheme-buffer))
(save-window-excursion
(run-scheme scheme-program-name)))
(or (scheme-get-process)
(error "No current process. See variable `scheme-buffer'"))) (defun scheme-split-window ()
(cond
((= (count-windows))
(delete-other-windows)
(split-window-vertically (floor (* 0.68 (window-height))))
(other-window )
(switch-to-buffer "*scheme*")
(other-window ))
((not (find "*scheme*"
(mapcar (lambda (w) (buffer-name (window-buffer w)))
(window-list))
:test 'equal))
(other-window )
(switch-to-buffer "*scheme*")
(other-window -)))) (defun scheme-send-last-sexp-split-window ()
(interactive)
(scheme-split-window)
(scheme-send-last-sexp)) (defun scheme-send-definition-split-window ()
(interactive)
(scheme-split-window)
(scheme-send-definition)) (add-hook 'scheme-mode-hook
(lambda ()
(paredit-mode )
(define-key scheme-mode-map (kbd "<f5>") 'scheme-send-last-sexp-split-window)
(define-key scheme-mode-map (kbd "<f6>") 'scheme-send-definition-split-window))) (require 'parenface)
(set-face-foreground 'paren-face "DimGray")