32.1 The Lisp Top Level
These functions constitute the Lisp top level, and its associated functions. [This whole section needs to be rewritten.]
si:lisp-top-level
This is the first function called in the initial Lisp environment. It calls lisp-reinitialize , clears the screen, and calls si:lisp-top-level1 .
lisp-reinitialize
This function does a wide variety of things, such as resetting the values of various global constants and initializing the error system.
si:lisp-top-level1
This is the actual top level loop. It prints out "105 FOOBAR " and then goes into a loop reading a form from standard-input , evaluating it, and printing the result (with slashification) to standard-output . If several values are returned by the form all of them will be printed. Also the values of * , + , - , // , ++ , ** , +++ , and *** are maintained (see below).
break Special Form
break is used to enter a breakpoint loop, which is similar to a Lisp top level loop. (break tag) will always enter the loop; (break tag conditional-form) will evaluate conditional-form and only enter the break loop if it returns non-nil . If the break loop is entered, break prints out
;bkpt tag 
and then enters a loop reading, evaluating, and printing forms. A difference between a break loop and the top level loop is that after reading a form, break checks for the following special cases: if the symbol ◊g is typed, break throws back to the Lisp top level. If ◊p is typed, break returns nil . If (return form) is typed, break evaluates form and returns the result.
- Variable
While a form is being evaluated by a read-eval-print loop, - is bound to the form itself.
+ Variable
While a form is being evaluated by a read-eval-print loop, + is bound to the previous form that was read by the loop.
* Variable
While a form is being evaluated by a read-eval-print loop, * is bound to the result printed the last time through the loop. If there were several values printed (because of a multiple-value return), * is bound to the first value.
// Variable
While a form is being evaluated by a read-eval-print loop, // is bound to a list of the results printed the last time through the loop.
++ Variable
++ holds the previous value of + , that is, the form evaluated two interactions ago.
+++ Variable
+++ holds the previous value of ++ .
** Variable
** holds the previous value of * , that is, the result of the form evaluated two interactions ago.
*** Variable
*** holds the previous value of ** .
lisp-initialization-list Variable
The value of lisp-initialization-list is a list of forms, which are sequentially evaluated by lisp-reinitialize .
lisp-crash-list Variable
The value of lisp-crash-list is a list of forms. lisp-reinitialize sequentially evaluates these forms, and then sets lisp-crash-list to nil .
32.2 Logging In
Logging in tells the Lisp Machine who you are, so that other users can see who is logged in, you can receive messages, and your INIT file can be run. An INIT file is a Lisp program which gets loaded when you log in; it can be used to set up a personalized environment. The init file is named user ; .LISPM (INIT) if you have a directory. When you log out, it should be possible to undo any personalizations you have made so that they do not affect the next user of the machine. Therefore, anything done by an INIT file should be undoable. In order to do this, for every form in the INIT file, a Lisp form to undo its effects should be added to the list which is the value of logout-list . The functions login-setq and login-eval help make this easy; see below.
user-id Variable
The value of user-id is either the name of the logged in user, as a string, or else an empty string if there is no user logged in. It appears in the who-line.
logout-list Variable
The value of logout-list is a list of forms which are evaluated when a user logs out.
login name
If anyone is logged into the machine, login logs him out. (See logout .) Then user-id is set from name . Finally login attempts to find your INIT file. It first looks in "user-id ; .LISPM (INIT)", then in "(INIT); user-id .LISPM", and finally in the default init file "(INIT); * .LISPM". When it finds one of these that exists, it loads it in. login returns t .
logout name
First, logout evaluates the forms on logout-list . Then it tries to find a file to run, looking first in "user-id ; .LSPM_ (INIT)", then in "(INIT); user-id .LSPM_", and finally in the default file "(INIT); * .LSPM_". If and when it finds one it these that exists, it loads it in. Then it sets user-id to an empty string and logout-list to nil , and returns t .
login-setq Special Form
login-setq is like setq except that it puts a setq form on logout-list to set the variables to their previous values.
login-eval x
login-eval is used for functions which are "meant to be called" from INIT files, such as eine:ed-redefine-keys , which conveniently return a form to undo what they did. login-eval adds the result of the form x to the logout-list .