The Emacs Text Editor
- Edit a file with extension.sml. You should be in SML-mode, using Tab to indent your code well. To open the SML/NJ REPL within Emacs, type C-c C-s (and then Enter to accept the sml interpreter) while working in an SML-mode buffer. This command creates an.sml. buffer unless one exists and starts an SML/NJ REPL in that buffer unless one is.
- GNU Emacs for Microsoft and Linux by default make the Alt key do Meta. On the Mac OS X, it's either ⌥option or ⌘command, depending on which emacs distribution you are using. There's usually a menu that lets you chose. In emacs documenation, the Meta key's notation is M. For example, M-x means Meta+x. Remove a Keybinding.
Emacs isan extensible, customizable, self-documenting display editor. Amongits many features, it has special modes ('major modes') for editingand running programs of various languages. In particular, there is amajor mode, SML-MODE, that provides support for editing and runningSML programs.
This document describes how to install, con gure, and use Emacs, SML/NJ, and SML-Mode-for-emacs (henceforth SML Mode) on your computer. These instructions should work for recent versions of Windows, Mac OS X, and Linux. 2 Emacs Installation (We strongly recommend Emacs version 24.X (for any X) so that you can use the most recent version of SML.
Emacs is included in macOS, and will almost certainly be installedon Linux systems. It can also be installed on Windows machines.Information about installing Emacs is included below.
Introduction to SML-MODE
To runsml (or smlcus — seebelow) as a child process of Emacs, one types
Editing a source file whose name ends with .sml (or.sig) causes Emacs to enter the major mode SML-MODE,at which point typing
(or META-x describe-modeRET)will cause a summary ofthe mode to be printed. One can send the contents of the source fileto sml by typing
If sml reports that the source file contains errors, then typing
will cause the cursor of the sml Badmash hindi rap guru all mp3 songs download. buffer to be positioned atthe first error message, and cause the cursor of the source file to beplaced at the location of the error itself. The next error can thenbe examined by typing CTRL-x ` again, and soon.
If you want SML-MODE to runsmlcus instead of sml,include the following line in your .emacs file:
You'll have to exit and re-enter Emacs for the abovechange to take effect.
Further information on SML-MODE is availablevia Emacs's info function (typeMETA-xinfoRETmsmlRET).
Installing Emacs
Installing Emacs on Linux
In the unlikely case that Emacs isn't already installed on aLinux machine, it can be obtained from www.gnu.org/software/emacs/emacs.html.
Installing Emacs on macOS
The version of Emacs that's distributed with macOS can onlybe run within a terminal. Instead, you will probably want toinstallEmacs for macOS.
Installing Emacs on Windows
Emacs will have to be installed on Windows machines. Informationabout the Windows version of Emacs, including instructions forobtaining and installing Emacs on Windows, can be foundat www.gnu.org/software/emacs/windows/ntemacs.html.
Installing SML-MODE
The SML-MODE distribution is available as acompressed tarball,as a zip archiveand as a directory.
Installing SML-MODE on Linux
Download Emacs For Mac
See the file INSTALL for instructions on installingSML-MODE on a machine running Linux, making use of thesupplied makefile, and running as root. The makefile willbyte-compile the .el files, producing .elc files.The .el and .elc files will go in yoursite-lisp directory, which will be called something like/usr/share/emacs/site-lisp. Then put the line
in your .emacs
Install Emacs Mac
file. The Info file sml-mode.infowill be put by the makefile in the Info directory, which will besomething like/usr/share/info. The makefile will add a link to this fileto the Info top-level node, using the command (modify the directory asneeded)Installing SML-MODE on macOS
The procedure for installing SML-MODE on macOS is very similarto that one for Linux. The difference is that, assuming you'veinstalled Emacs.app, the site-lisp directorywill be called Gta v off road cars.
and the info directory will be called
and so the makefile will have to be modified to use thesedirectories. (When the makefile byte-compiles .el files,it will use the terminal version of Emacs. You can also installSML-MODE for that terminal version.)
Installing SML-MODE on Windows
On a Windows machine, you'll have to install the mode by hand,working by analogy with the installation under Linux.Byte-compile the .el files using the Emacs functionbyte-compile-file. The .el and .elcfiles will go in your site-lisp directory, which will becalled something like c:emacssite-lisp, and theline
should be placed in your .emacs file. The Infofile sml-mode.info should be put in the Info directory,which will be called something like c:emacsinfo. Youshould edit the filedir of the Info directory so that it includes a pointer tosml-mode.info.
Alley Stoughton([email protected])