Tips on using Allegro Common Lisp

All basic commands to Allegro are keywords proceeded by a colon ":"
and followed by arguments that do not need to be quoted.

Aborting an error

If an error occurs, the Lisp interpreter will invoke the "break package" with
error message and a different prompt. To simply exit from the error, type
":res" for "resume" and it will abort the run and return to the top-level
prompt. For example:

USER(1): (rest 3)
Error: Attempt to take the cdr of 3 which is not listp.
[condition type: SIMPLE-ERROR]
[1] USER(2): :res
USER(3):

Aborting a run

If the program is running too long (e.g. caught in an infinite loop)
or if you simply want to terminate execution, type "C-c C-c"
(two control C's in succession) to abort. It may take a while for
Lisp to notice your interupt, so be patient after you type the abort
command and it should eventually terminate.

Compiling and loading a file

The command ":cl" followed by the name of a file (no quotes, no need to include
the .lisp extension) will compile and load a Lisp file. The command ":ld" will
simply load a file, prefering the compiled version if there is one.

If you are using Allegro under Emacs, you can then kill the buffer
using the Emacs command "C-x k"

Editing commands in the buffer

While typing an expression to evaluate, you can edit it with normal Emacs
commands. In addition, you can recover and edit previous ones using "C-c C-p"
(repeatedly) to get previous commands, and "C-c C-n" (repeatedly) to get next
ones.

Editing Lisp program files

If you load ACL in Emacs first and name files with the extension ".lisp", they
should be recognized and put in Emacs Common Lisp mode when you open them. If
this ever fails, you can enter the mode manually by typing M-x to enter an Emacs
command in the mini-buffer at the bottom and typing common-lisp-mode at the
prompt.
In this mode, programs should be indented automatically as you type
them in (by automatically spacing over after you hit return).
Use C-M-q, (Hold the CONTROL and META keys while depressing the q key)
when the point is on an opening parenthesis, to reindent a complete
expression.

Using the Debugger

See the list of debugger commands by typing ":help" in a break.
Particularly useful is ":zo" which will show a trace of calls on the
stack.

The window debugger allows you to examine and manipulate the calling
stack in various ways. Right-click in the left margin of a frame to
bring up a menu of commands for this frame, or right-click on
a function name or argument to bring up a menu of options for
that item.

The commands ":dn" and ":up:" will move your current position up and down the
stack. The command ":local var-name" will show you the value of the local
variable var-name at the current point in the stack. For example:

ACL Emacs menus

Peruse the items under the menus that ACL adds to Emacs. The various loading
and compiling options under ACLFile are useful when editing a Lisp file.
The various options under ACLHelp, particularly Arglist, are
useful for obtaining information when calling or writing functions.