(setq fp (open "init.lsp" :direction :input))Evaluating this expression will result in the file "init.lsp" being opened. The file object that will be returned by the OPEN function will be assigned to the variable "fp".
It is now possible to use the file for input. To read an expression from the file, just supply the value of the "fp" variable as the optional "stream" argument to READ.
(read fp)Evaluating this expression will result in reading the first expression from the file "init.lsp". The expression will be returned as the result of the READ function. More expressions can be read from the file using further calls to the READ function. When there are no more expressions to read, the READ function will give an error (or if a second nil argument is specified, will return nil or whatever value was supplied as the third argument to READ).
Once you are done reading from the file, you should close it. To close the file, use the following expression:
(close fp)Evaluating this expression will cause the file to be closed.