Previous Next Contents

25. Getting Started with Emacs

You can use Emacs to edit LISP code: most Emacses are set up to enter LISP mode automatically when they find a file which ends in .lisp, but if yours isn't, you can type M-x lisp-mode. M-x means: meta-key plus x. If there is a meta (or ALT) key try it. If this fails M-x can be typed by typing ESC followed by x. If your keyboard lacks an ESC key, curse DEC, and type control-[ followed by x.

You can run LISP under Emacs, too: make sure that there is a command in your path called "lisp" which runs your favorite LISP. For example, you could type

ln -s /usr/local/bin/clisp ~/bin/lisp

This isn't needed in CMUCL. Lisp is called lisp there.

Then in Emacs type M-x run-lisp. You can send LISP code to the LISP you just started, and do all sorts of other cool things; for more information, type C-h m from any buffer which is in LISP mode. This means: press control and h, release both and press m.

Actually, you don't even need to make a link. Emacs has a variable called inferior-lisp-program; so if you add the line

(setq inferior-lisp-program "/usr/local/bin/clisp")

to your .emacs file, Emacs will know where to find CLISP when you type M-x run-lisp.


Previous Next Contents