2 Customizing the Lisp Environment
*enter-top-level-hook*
; the function reads the command line that invoked Lisp and parses all of the command-line arguments. Unless the command-line arguments specify otherwise, the function then searches your home directory for an initialization file and loads it if possible. Section 2.4 on page 9 presents more information about initialization files.The default startup function parses command-line arguments in the order they appear on the command line. It recognizes and executes the following options:
[-load | -l]
fileload
; the file argument is passed to load
as a string.
"~/.lisp"
instead of the regular initialization file:
% lisp -load ~/.lisp -n
[-no-init-file | -n]
% lisp -n
[-eval | -e]
form
% lisp -eval "(setq *print-base* 16)"
[-quit | -q]
quit
, which terminates the Lisp environment. In the example, the file"demo"
is loaded, the function demo
is called, but Lisp quits before it enters top level.
% lisp -load "demo" -eval "(demo)" -quitThe startup function ignores all other command-line arguments; however, they are available for processing by the function
command-line-argument
.
Generated with Harlequin WebMaker