XLISP COMMAND LOOP


When XLISP is started, it first tries to load the workspace "xlisp.wks", or an alternative file specified with the "-wfilename" option, from the current directory. If that file doesn't exist, or the "-w" flag is in the command line, XLISP builds an initial workspace, empty except for the built-in functions and symbols.

Then, providing no workspace file was loaded, XLISP attempts to load "init.lsp" from a path in XLPATH or the current directory. This file can be modified to suit the user's requirements. It contains a number of preference items.

If *startup-functions* is non-nil (default is nil), it is taken as a list of functions with no arguments which are executed in sequence at this time. This allows automatically starting applications stored in workspaces.

If the variable *load-file-arguments* is non-nil (default is "t"), it then loads any files named as parameters on the command line (after appending ".lsp" to their names). If the "-v" flag is in the command line, then the files are loaded verbosely.

The option "-tfilename" will open a transcript file of the name "filename". At this time the top level command loop is entered. This is the function TOP-LEVEL-LOOP, by default.

XLISP then issues the following prompt (unless standard input has been redirected):

	>
This indicates that XLISP is waiting for an expression to be typed. If the current package is other than USER, the the package name is printed before the ">".

When a complete expression has been entered, XLISP attempts to evaluate that expression. If the expression evaluates successfully, XLISP prints the result and then returns for another expression.

The following control characters can be used while XLISP is waiting for input:

Backspace
delete last character
Del
delete last character
tab
tabs over (treated as space by XLISP reader)
ctrl-C
goto top level
ctrl-G
cleanup and return one level
ctrl-Z
end of file (returns one level or exits program)
ctrl-P
proceed (continue)
ctrl-T
print information
Under MS-DOS (at least) the following control characters can be typed while XLISP is executing (providing standard input has not been redirected away from the console):

ctrl-B
BREAK -- enter break loop
ctrl-S
Pause until another key is struck
ctrl-C
go to top level
ctrl-T
print information
Under MS-DOS if the global variable
*dos-input* is set non-NIL, DOS is used to read entire input lines. Operation this way is convenient if certain DOS utilities, such as CED, are used, or if XLISP is run under an editor like EPSILON. In this case, normal command line editing is available, but the control keys will not work (in particular, ctrl-C will cause the program to exit!). Use the XLISP functions top-level, clean-up, and continue instead of ctrl-C, ctrl-G, and ctrl-P.

Under MS-DOS if the global variable *dos-input* is NIL, a special internal line editor is used. In this case the last 20 lines are saved, and can be recalled and viewed using the up and down arrow keys. Duplicate lines are not saved.

An additional feature is symbol name lookup. This command takes what appears to be an incomplete symbol name to the left of the cursor and prints all interned symbol names that match. Case is ignored. The printnames of the symbols are printed without processing.

The control keys for the editor are:

Up Arrow
Previous command in queu
Down Arrow
Next command in queue
Left Arrow
Move cursor to left
Right Arrow
Move cursor to right
Home
Move cursor to start of line
End
Move cursor to end of line
Delete
Delete character at cursor
Backspace
Delete character to left of cursor
Escape
Delete current line
Tab
Look up partial symbol name to left of cursor
Characters are inserted at the current cursor position. Lines are limited in length to the width of the display, and invalid keystrokes cause the bell to ring.


XLISP-PLUS - Version 2.1g - Tom Almy tom.almy@tek.com - 18 JUL 94
Generated with
WebMaker