Spring Switzerland GmbH 2000 User Manual
Page 6

Figure 3: The Emacs editor with an SML program
Figure 4: The SML session window
Meta-
✄
means:
hold down the “Alt” or “Alt function” key and press the key
✄
.
Ctrl-
✄
means:
hold down the “Ctrl” key and press the key
✄
.
This a brief step-by-step guide to editing programs.
1. Start Emacs by use of the emacs button in the button-bar. An empty Emacs window called
*scratch*
appears. Move the cursor to the Emacs window and click the left mouse button
to select this window. Do not type your program in the
*scratch*
window.
2. To create an SML program buffer for a program called “
gcd.sml
”, type
Ctrl-x Ctrl-f
,
then
gcd.sml
, then press
return
. (Alternatively, use the
Files
menu.)
If the file
gcd.sml
exists on disk already, it is loaded into Emacs. Otherwise a new empty
buffer is created. The suffix “
.sml
” is important: it puts the buffer in Sml mode.
3. Type and edit your program in the SML program buffer. Editing commands are described in the
reference card.
4. Type
Ctrl-x Ctrl-s
to save the program in a file on the disk. (Alternatively, use the
Files
menu.)
5. To load the program into an SML session, type
Ctrl-c Ctrl-b
in the SML program buffer.
Press
return
twice to answer the questions
Ml command:
mosml
and
Any args:
.
6