Next: Using the module system, Previous: Running Scheme48, Up: User environment
Emacs is the canonical development environment for Scheme48. The scheme.el and cmuscheme.el packages provide support for editing Scheme code and running inferior Scheme processes, respectively. Also, the scheme48.el package provides more support for integrating directly with Scheme48.1 scheme.el and cmuscheme.el come with GNU Emacs; scheme48.el is available separately from
http://www.emacswiki.org/cgi-bin/wiki/download/scheme48.el.
To load scheme48.el if it is in the directory emacs-dir, add these lines to your .emacs:
(add-to-list 'load-path "emacs-dir/") (autoload 'scheme48-mode "scheme48" "Major mode for improved Scheme48 integration." t) (add-hook 'hack-local-variables-hook (lambda () (if (and (boundp 'scheme48-package) scheme48-package) (progn (scheme48-mode) (hack-local-variables-prop-line)))))
The add-hook
call sets Emacs up so that any file with a
scheme48-package
local variable specified in the file's
-*-
line or Local Variables
section will be entered in
Scheme48 mode. Files should use the scheme48-package
variable
to enable Scheme48 mode; they should not specify Scheme48 mode
explicitly, since this would fail in Emacs instances without
scheme48.el. That is, put this at the tops of files:
;;; -*- Mode: Scheme; scheme48-package: ... -*-
Avoid this at the tops of files:
;;; -*- Mode: Scheme48 -*-
There is also SLIME48, the Superior Lisp Interaction Mode for Emacs with Scheme48. It provides a considerably higher level of integration the other Emacs packages do, although it is less mature. It is at
http://mumble.net/~campbell/scheme/slime48.tar.gz;
there is also a Darcs repository2 at
http://mumble.net/~campbell/darcs/slime48/.
Finally, paredit.el implements pseudo-structural editing facilities for S-expressions: it automatically balances parentheses and provides a number of high-level operations on S-expressions. Paredit.el is available on the web at
http://mumble.net/~campbell/emacs/paredit.el.
cmuscheme.el defines these:
Starts an inferior Scheme process or switches to a running one. With no argument, this uses the value of
scheme-program-name
to run the inferior Scheme system; with a prefix argument scheme-prog, this invokes scheme-prog.
Under scheme48-mode
with scheme.el, cmuscheme.el,
and scheme48.el, these keys are defined:
forward-sexp
backward-sexp
kill-sexp
backward-kill-sexp
indent-sexp
mark-sexp
mark-sexp
switch-to-scheme
scheme48-load-file
scheme48-send-region
scheme48-send-region-and-go
scheme48-send-definition
scheme48-send-definition
scheme48-send-definition-and-go
scheme48-send-last-sexp
[1] scheme48.el is based on the older cmuscheme48.el, which is bundled with Scheme48 in the emacs/ directory. Since cmuscheme48.el is older and less developed, it is not documented here.
[2] Darcs is a revision control system; see
http://www.darcs.net/
for more details.