Spring Switzerland GmbH 2000 manual Emacs editor with an SML program

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-xCtrl-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-xCtrl-sto 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-cCtrl-bin the SML program buffer.

 

Press return twice to answer the questions Ml command: mosml and Any args:.

6

Image 6
Contents Spring term Using Linux at the ITU data bars ContentsLogging Executing commands via the button-bar Windows and icons WindowPrinting Running Java programs Running SML programsEmacs editor with an SML program SML system functions File, directories and paths DBD*,+--./.!0-!1*$324504 Star OfficeSome useful Unix commands Online documentationUsing floppy-disks Changing passwordUsing files Creating and removing directoriesRedirection of input or output Desktop enviroments in the data barsManipulation of text files PipelinesWindowMaker More about LinuxKDE The K Desktop Enviroment Gnome GNu Object Model EnviromentDanish user groups Getting Linux on your own machine