At the Command line:
- Clisp
is what you type o start the interpreter. Some useful options:
- -c filename causes clisp to compile filename, rather than starting the interpreter. The default extension for lisp files is .lsp
- -o outfilename
is used with -c to specify the output file. The default extension is .fas.
Starting and Stopping
- To load a file of lisp code into clisp, type (load "file.lsp"), or (load "file").
- To leave the debugger, hit Ctrl-D. You're in the debugger if you have a prompt like this:
1. Break>
- To exit lisp, type (exit) ...or a lot of Ctrl-Ds.
Printing, help, and editors
- To capture your Lisp session (or part of it) in a file, begin with (dribble "filename") and end with (dribble).
- For help on a function (eg., foobar), type (apropos foobar), (apropos car), etc.
- The emacs editor knows you're editing a Lisp file, if it ends in ".lsp" The tab key will indent the current line correctly, given that you've got the parentheses right. This is VERY helpul for detecting parenthesis errors!
- Both emacs and vi let you know what a closing parenthesis matches by briefly highlighting the matching open parenthesis.
Using vi with lisp