;; Start Scheme mode when editing a file with a name ending in .ss. (setq auto-mode-alist (cons '("\\.ss$" . scheme-mode) auto-mode-alist)) ;; When starting Scheme mode, make XEmacs aware that Chez Scheme is not ;; the MIT Scheme dialect, and have it wrap lines automatically. (add-hook 'scheme-mode-hook (lambda () (setq scheme-mit-dialect nil) (auto-fill-mode 1))) ;; To run Chez Scheme in a separate subwindow, execute the Emacs Lisp ;; function run-chez-scheme: (defun run-chez-scheme () (interactive "*") (if (< (count-windows) 2) (split-window)) (run-scheme "/usr/local/bin/scheme")) ;; Bind the F1 key to the run-chez-scheme function just defined and the ;; keypad Enter key to the function that signals the Chez Scheme waiter ;; to collect a command or definition. (global-set-key [f1] 'run-chez-scheme) (global-set-key [kp_enter] 'xscheme-send-previous-expression)