All right, now what we're going to do is we're going to get, SML mode for E max
installed, so we've installed the E max and we've installed SML, but now we want
to make E max convenient and useful for both writing and running SML programs. So
we're going to do this entirely from within E max.
So the first thing I'm going to do is open it, just going to type E max here
and run it, you're going to see some slightly different colors here and you're
not going to see the menu bar, that is just formating that I did.
so that it's easier to see on the video. You probably still have a white
background and that's just fine. so now I've opened EMAX.
I'm now going to run a command meta-x list packages.
So on a windows keyboard I'm going to type alt X.
And then type list. Either space, although it'll print as a
dash, or you could type the dash, packages, and hit return.
What that's going to do, if you're in Emax version 24 something or higher, is
bring up a list of packages that are easy to install.
If you have an older version of Emax or you're not connected to the internet,
you're going to have to follow some significantly more complicated
instructions in an older version of SML Mode, and the written instructions do
walk through that. But assuming you got this screen to go
up, you can just scroll down either with your mouse or with your keyboard, down
here to SML dash Mode and then you can just take your mouse and click on that.
That's going to split the screen in two here.
So I'm now seeing two buffers in EMAX, and you can just click on this install
button. It's going to ask if I want to install
it. I clearly do.
And a minute later it says that everything's installed.
Now what I want to do is go ahead and exit Emax with control X, control C.
And then I'm just going to reopen it here.
and bring that. Back over so you can see it and get that
nice big font again. And now we just want to check that we've
done it correctly. We are done installing.
So you want to open an s m l file. Now, you can use control x control f and
then the file name to do this, or if you have a file created, and I'm just
going to create one over here on the desktop.
I'm not going to give it a t x t extension.
I'm going to call it something like test dot s m l.
So I'll get a warning saying do you really want to change the file extension,
and I do. Because when you have something with an s
m l file extension. Emax should now know that it's an SML
file. So I can literally just drag it on to
Emax, and you'll notice down here on the bottom.
The mode line says, I'm add-, editing an SML file.
So, if you write SML code which if you haven't learned how to do yet, something
you will learn how to do soon. Something like Val X= three+4, Val Y= X
times five. You'll see coloring.
We have multiple lines here. You see nice indentation by hitting the
tab key and etcetera. When I want to save the file, I type
control X, control S. Now what if I wanted to run SML.
I'm not going to do that in this buffer but I can do it from within EMAX.
Anytime I'm eding- editing a.SML file I can just type control C control S now.
All I did was type control c control s. What's come up is sml command sml.
Hit return. It's going to split my buffer in two and
now here at the bottom I do have an sml read eval print loop where I could type
one plus one semi-colon and get two. In fact, because I did that, from that
test that SML file, I'm in the same folder directory as I was over there, so
if I want to load the contents of that file, I can say, use, then in quotation
marks, test that SML on semi colon, and indeed it just ran that program, and said
X is seven and Y is 35, so we have everything correctly installed, we can
now use SML, from within E macs, edit are files in there and we're all set with
installation for the first half of the course.