How to run SCHEME in EMACS
There are a few different versions of Scheme on Athena: 6.001 Scheme
in the 6.001 locker, and two versions of MIT Scheme in the scheme
locker. Different classes require different versions of scheme, so
you should use the appropriate version for your class. For more
information on the different versions of scheme, see:
http://www.ai.mit.edu/courses/6.034s/scheme.html
http://www.ai.mit.edu/courses/6.034f/homeworkhome.html
To run 6.001 Scheme in Emacs:
add 6.001
emacs-scheme &
The first time you run this, your .emacs file will be modified to
enable running Scheme in Emacs, and 6.001 Scheme will be started in
Emacs. When later running the emacs-scheme script again, 6.001 Scheme
will simply be started.
To run MIT Scheme, or to edit your .emacs file manually to run 6.001
Scheme:
Add the following lines to your .emacs file:
(global-font-lock-mode t)
(load-library "xscheme")
(show-paren-mode 1)
Then, to run Scheme, type:
M-x run-scheme
This will run the first version of scheme in your path. If you have
"add 6.001" in your .environment file, you will get 6.001 Scheme. If
you have "add scheme" in your .environment file, you will get MIT
Scheme.
Alternatively, you can choose to tell Emacs to always run a specific
version of Scheme. To do so, add one of the following lines to your
.emacs file, depending on what version of Scheme you wish to run:
6.001 Scheme (only available for Linux):
(custom-set-variables
'(scheme-program-name "athrun 6.001 scheme"))
MIT Scheme (available for both Linux and Solaris):
(custom-set-variables
'(scheme-program-name "athrun scheme scheme"))
MIT Scheme version 7.7.1 (most recent version of Scheme; only
available on Linux):
(custom-set-variables
'(scheme-program-name "/afs/athena.mit.edu/software/scheme/scheme-7.7.1/bin/scheme"))
As before, to run Scheme, start emacs, and type
M-x run-scheme
If you'd like the ability to run multiple versions of Scheme without
changing your .emacs file every time, you can define functions in your
.emacs file to do so. Instead of adding the custom-set-variables
lines described above, add the following to your .emacs file instead:
(defun 6001-scheme ()
"Runs 6.001 scheme"
(interactive)
(run-scheme "athrun 6.001 scheme -emacs")
(process-kill-without-query (get-process "scheme")))
(defun mit-scheme ()
"Runs MIT scheme"
(interactive)
(run-scheme "athrun scheme scheme -emacs")
(process-kill-without-query (get-process "scheme")))
(defun mit-scheme-new ()
"Runs MIT scheme 7.7.1"
(interactive)
(run-scheme "/afs/athena.mit.edu/software/scheme/scheme-7.7.1/bin/scheme -emacs")
(process-kill-without-query (get-process "scheme")))
Then, to run Scheme, type one of the following to start that version
of Scheme:
M-x 6001-scheme
M-x mit-scheme
M-x mit-scheme-new
If you wish to switch versions of Scheme, however, you will need to
quit Scheme first. This can be done by restarting Emacs or killing
the *scheme* buffer.
Last updated: $Date: 2004/04/04 22:32:27 $
|