Next: , Previous: , Up: Operational Features   [Contents][Index]

3.7 Editing Scheme Code

Function: ed arg1 …

The value of the environment variable EDITOR (or just ed if it isn’t defined) is invoked as a command with arguments arg1 ….

Function: ed filename

If SCM is compiled under VMS ed will invoke the editor with a single the single argument filename.

Gnu Emacs:

Editing of Scheme code is supported by emacs. Buffers holding files ending in .scm are automatically put into scheme-mode.

If your Emacs can run a process in a buffer you can use the Emacs command ‘M-x run-scheme’ with SCM. Otherwise, use the emacs command ‘M-x suspend-emacs’; or see “other systems” below.

Epsilon (MS-DOS):

There is lisp (and scheme) mode available by use of the package ‘LISP.E’. It offers several different indentation formats. With this package, buffers holding files ending in ‘.L’, ‘.LSP’, ‘.S’, and ‘.SCM’ (my modification) are automatically put into lisp-mode.

It is possible to run a process in a buffer under Epsilon. With Epsilon 5.0 the command line options ‘-e512 -m0’ are neccessary to manage RAM properly. It has been reported that when compiling SCM with Turbo C, you need to ‘#define NOSETBUF’ for proper operation in a process buffer with Epsilon 5.0.

One can also call out to an editor from SCM if RAM is at a premium; See “under other systems” below.

other systems:

Define the environment variable ‘EDITOR’ to be the name of the editing program you use. The SCM procedure (ed arg1 …) will invoke your editor and return to SCM when you exit the editor. The following definition is convenient:

(define (e) (ed "work.scm") (load "work.scm"))

Typing ‘(e)’ will invoke the editor with the file of interest. After editing, the modified file will be loaded.


Next: , Previous: , Up: Operational Features   [Contents][Index]