%cl-entities;
%imp-entities;
%unix-entities;
locale-dir">
lisp-file">
lisp-lib-dir">
expressions">
&lf;'>
]>
&clisp; version @VERSION@Platform: @PLATFORM@Last modified: @TODAY@@VERSION@CLISP
&clisp-authors; &clisp-doc-copyright; &clisp-abstract;
clisp1ANSI Common LispPlatform: @PLATFORM@clisp&the-ansi; &cl; compiler, interpreter and debugger.&clisp-cmd;
&opt-q;&opt-v;&opt-norl;&opt-ansi;&opt-traditional;&opt-modern;&opt-C;&opt-norc; &lf;
&opt-lf; DescriptionInvokes the &cl; interpreter and compiler.Interactive ModeWhen called without batch arguments,
executes the &repl;, in which expressions are in turn &read; from the standard input,&eval;uated by the lisp interpreter,and their results are &print;ed to the standard output.
Non-Interactive (Batch) ModeInvoked with &opt-c;, compiles the specified lisp files to a
platform-independent &bytecode; which can be executed more efficiently.Invoked with &opt-x;, executes the specified lisp expressions.Invoked with &opt-lf;, runs the specified lisp file.OptionsDisplays a help message on how to invoke &clisp;.
Displays the &clisp; version number,
as given by the function &lisp-implementation-version;,
the value of the variable &features-my;,
as well some other information.Displays a summary of the licensing information,
the &gnu; &gpl;.Displays information about the &mem-image; being invoked:
whether is it suitable for scripting as well as the &documentation-k;
supplied to &savemem;. &lld;Specifies the installation directory.
This is the directory containing the linking sets and other data files.
This option is normally not necessary, because the installation directory
is already built-in into the &clisp-cmd; executable.
Directory &lld; can be changed dynamically using the &symbol-macro; &libdir;.
Print the installation directory and exit immediately.
The namestring of &libdir; is printed without any quotes.
This is mostly useful in module Makefiles, see,
e.g., modules/syscalls/Makefile.in.
linking-setSpecifies the &linkset; to be run.
This is a directory (relative to the &lld;)
containing at least a main executable (&rt;) and an initial &mem-image;.
Possible values are
&varlist-table;&base;the core &clisp;&full;core plus all the modules with which this
installation was built, see
.
The default
is &base;.mem-fileSpecifies the initial &mem-image;. This must be a
memory dump produced by the &savemem; function by this &clisp-cmd; &rt;.
It may have been compressed using &gnu; &gzip;.
&mems-r;Sets the amount of memory &clisp;
tries to grab on startup. The amount may be given as
&n-r;&n-r;Bmeasured in bytes
&n-r;&n-r;Wmeasured in machine words (4×&n-r; on
32-bit platforms, 8×&n-r; on 64-bit platforms)
&n-r;K&n-r;KBmeasured in kilobytes
&n-r;KWmeasured in kilowords
&n-r;M&n-r;MBmeasured in megabytes
&n-r;MWmeasured in megawords
The default is 3 megabytes.
The argument is constrained between 100 KB and 16 MB.
The argument is constrained between 100 KB and 64 MB.
The argument is constrained between 100 KB and 256 MB.
The argument is constrained above 100 KB.
This version of &clisp;
is not likely to actually use the entire &mems-r; since &gc;ion will
periodically reduce the amount of used memory.
It is therefore common to specify 10 MB even if only 2 MB are going
to be used.
eventually uses the entire &mems-r;.
allocates memory dynamically. &mems-r; is essentially ignored
(except that it determines the Lisp &STACK; size).
&lang-r;Specifies the
language
&clisp; uses to communicate with the user. This may be
only english.
one of englishgermanfrenchspanishdutchrussiandanish.
Other languages may be specified through the &env-var; LANG,
provided the corresponding message catalog is installed.
The language may be changed dynamically using the &symbol-macro;
&curr-lang;. &ld;Specifies the base directory of locale files.
&clisp; will search its message catalogs in
&ld;/&lang-r;/LC_MESSAGES/clisp.mo.
This directory may be changed dynamically using the &symbol-macro;
&curr-lang;.Specifies the encoding used for the given domain,
overriding the default which depends on the &env-var;s
LC_ALL, LC_CTYPE, LANG.
&dom-r; can be
&varlist-table;
fileaffecting &def-file-enc;
pathnameaffecting &path-enc;
terminalaffecting &term-enc;
foreignaffecting &foreign-enc;
miscaffecting &misc-enc;
blankaffecting all of the above.
Note that the values of these &symbol-macro;s that have
been saved in a &mem-image; are ignored: these &symbol-macro;s are
reset based on the OS environment &after-e; the &mem-image; is loaded.
You have to use the &RC-file;, &init-hooks; or &init-function; to
set them on startup, but it is best to set the aforementioned
&env-var;s appropriately for consistency with other programs.
See .
Change verbosity level: by default, &clisp; displays a
banner at startup and a good-bye message when quitting, and initializes
&load-verbose-var; and &compile-verbose-var; to &t;, and
&load-print-var; and &compile-print-var; to &nil;, as per &ansi-cl;.
The first &opt-q; removes the banner and the good-bye message, the
second sets variables &load-verbose-var;, &compile-verbose-var; and
&savemem-verbose; to &nil;.
The first &opt-v; sets variables &err-pr-bt;, &load-print-var; and
&compile-print-var; to &t;, the second sets &load-echo; to &t;.
These settings affect the output produced by &opt-i; and &opt-c; options.
Note that these settings persist into the &repl;.
Repeated and cancel each other,
e.g., is equivalent to .
actionEstablish global error handlers,
depending on action:appease&cont-err;s are turned into &warning-t;s (with
&appease-cerrors;) other &error-t;s are handled in the default way
debug&error-t;s &invoke-debugger; (the normal &repl;
behavior), disables &batch-mode; imposed by &opt-c;, &opt-x;,
and &opt-lf;,abort&cont-err;s are appeased, other &error-t;s
are &abort;ed with &abort-on-error;exit&cont-err;s are appeased, other &error-t;s terminate
&clisp; with &exit-on-error; (the normal &batch-mode; behavior).
See also &set-global-handler;.Start an interactive &repl; after processing the
&opt-c;, &opt-x;, and &opt-lf; options and on any &error-t; &signal;ed
during that processing.Disables &batch-mode;.Wait for a keypress after program termination.
Interact better with &emacs;
(useful when running &clisp; under &emacs; using &slime;, &ilisp; et al).
With this option, &clisp; interacts in a way that &emacs; can deal with:
unnecessary prompts are not suppressed.
The &readline; library treats &tab-c;
(see ) as a normal self-inserting
character (see ).
Do not use &readline; even when it has been linked against.
This can be used if one wants to paste non-&ascii; characters, or
when &readline; misbehaves due to installation (different versions on
the build and install machines) or setup (bad TERM
&env-var; value) issues.Comply with the &ansi-cl; specification even where
&clisp; has been traditionally different by setting the
&symbol-macro; &ansi; to &t;.Traditional: reverses the residual effects of
&opt-ansi; in the saved &mem-image;.Provides a modern view of symbols: at startup the
&package-var; variable will be set to the &cs-clu; package, and the
&print-case-var; will be set to :DOWNCASE.
This has the effect that symbol lookup is case-sensitive (except for
keywords and old-style packages) and that keywords and uninterned symbols
are printed with lower-case preferrence.
See .
&pack-r;At startup the value of the variable &package-var;
will be set to the package named &pack-r;.
The default is the value of &package-var; when the image was
saved,
normally &clu-pac;.Compile when loading: at startup the value of the
variable &load-comp; will be set to &t;.
Code being &load;ed will then be &compile;d on the fly.
This results in slower loading, but faster execution.
Normally &clisp; loads the user
run
control (RC) file on startup (this happens
&after-e; the &opt-C; option is processed).
The file loaded is .clisprc.lisp
or .clisprc.fas
in the home directory &user-homedir-pathname;, whichever is newer.
This option, &opt-norc;, prevents loading of the &RC-file;.
&dir-r;Specifies directories to be added to &load-paths;
at startup. This is done &after-e; loading the &RC-file; (so that
it does not override the command-line option) but &before-e; loading
the init-files specified by the options (so that
the init-files will be searched for in the specified directories).
Several options can be given; all the specified
directories will be added.init-fileSpecifies initialization files to be &load;ed
at startup. These should be lisp files (source or compiled).
Several options can be given; all the specified
files will be loaded in order. &lf;Compiles the specified &lf;s to &bytecode;
(*.fas). The compiled files can then be
&load;ed instead of the sources to gain efficiency.Imposes &batch-mode;.outputfileSpecifies the output file or directory for the
compilation of the last specified &lf;.
Produce a &bytecode; &disassemble; listing
(*.lis) of the files being compiled.
Useful only for debugging.
See for details.
&exprs;Executes a series of arbitrary expressions instead
of a &repl;.
The values of the expressions will be output to &standard-output-var;.
Due to the argument processing done by the shell, the &exprs; must be
enclosed in double quotes, and double quotes and backslashes must be
escaped with backslashes.Imposes &batch-mode;.&lf; [ &arg-r; ... ]Loads and executes a &lf;, as described in
.
There will be no &repl;.
Before &lf; is loaded, the variable &args; will be bound to a list of
strings, representing the &arg-r;s.
The first line of &lf; may start with #!,
thus permitting &clisp; to be used as a script interpreter.
If &lf; is -,
the &standard-input-var; is used instead of a file.This option is disabled if the &mem-image;
was created by &savemem; with &nil; &script-k; argument.
In that case the &list-t; &args; starts with &lf;.This option must be the last one.No &RC-file; will be executed.Imposes &batch-mode;.As usual, stops option processing and places
all remaining command line arguments into &args;.Language ReferenceThe language implemented is &the-ansi; &cl;.
The implementation mostly conforms to the ANSI Common Lisp standard,
see .&ansi-cl-bib;Command Line User Environment&help;get context-sensitive on-line help, see
.
(&apropos-my; &name-r;)list the &symbol-t;s matching &name-r;.
(&describe-my; &symbol-r;)describe the &symbol-r;.
(exit)(quit)(bye)quit
&clisp;.EOF
(&ctrl;D on &unix;)
(&ctrl;Z on &win32;)
leave the current level of the &repl;
(see also ).
arrow keysfor editing and viewing the input history, using the
&readline; library.&tab-c; keyContext sensitive:
If you are in the function
position (in the first symbol after an opening paren or in
the first symbol after a &sharp-prime;), the completion is
limited to the symbols that name functions.If you are in the "filename position" (inside a
string after &sharp-P;), the completion is done across file names,
&bash;-style.If you have not typed anything yet, you will get
a help message, as if by the &help; command.If you have not started typing the next symbol
(i.e., you are at a whitespace), the current function or macro is
&describe-my;d.Otherwise, the symbol you are currently typing is
completed.Using and Extending &clisp;John
Foderaro&cl; is a programmable
programming language.When &clisp; is invoked, the &rt; loads
the initial memory image and outputs
the prompt;
at which one can start typing &defvar;s, &defun;s and &defmacro;s.To avoid having to re-enter the same definitions by hand in every
session, one can create a lisp file with all the variables, functions,
macros, etc.; (optionally) compile it with &compile-file;; and &load;
it either by hand or from the &RC-file;; or save a &mem-image; to
avoid the &load; overhead.However, sometimes one needs to use some functionality implemented in
another language, e.g., call a &c-lang; library function.
For that one uses the Foreign
Function Interface and/or
the External
Modules facility.
Finally, the truly adventurous ones might delve
into Extending the
Core.Files&clisp-cmd;clisp.exestartup driver (an executable or, rarely, a shell script)
which remembers the location of the &rt;
and starts it with the appropriate arguments
&lisp-run;lisp.exemain executable (runtime) - the part of &clisp;
implemented in &c-lang;.lispinit.meminitial &mem-image; (the part of &clisp; implemented
in lisp)config.lispsite-dependent configuration (should have been
customized before &clisp; was built); see
*.lisplisp source*.faslisp code, compiled by &clisp;
*.liblisp source library information,
generated by &compile-file-my;, see
.
*.cC code, compiled from lisp source by &clisp;
(see )
For the &clisp; source files,
see .EnvironmentAll &env-var;s that &clisp; uses are read at most once.CLISP_LANGUAGEspecifies the language &clisp; uses to communicate
with the user. The legal values are identical to those of the &opt-L;
option which can be used to override this &env-var;.
LC_CTYPEspecifies the locale which determines the character
set in use. The value can be of the form
&lang-r; or
&lang-r;_country or
&lang-r;_country.charset,
where &lang-r; is a two-letter ISO 639
language code (lower case), country is a
two-letter ISO 3166 country code (upper case).
charset is an optional character set
specification, and needs normally not be given because the character
set can be inferred from the language and country.
This &env-var; can be overridden with the &opt-E; option.
LANGspecifies the language &clisp;
uses to communicate with the user, unless it is already specified
through the &env-var; CLISP_LANGUAGE or the
&opt-L; option.
It also specifies the locale determining the character set in use, unless
already specified through the &env-var; LC_CTYPE.
The value may begin with a two-letter ISO 639 language code, for example
en, de, fr.
HOMEUSERused for determining the value of the function
&user-homedir-pathname;.SHELLCOMSPECis used to find the interactive command interpreter
called by &shell;.TERMdetermines the screen size recognized by the pretty
printer.ORGANIZATIONfor &short-site-name; and &long-site-name; in
&config-lisp;.CLHSROOTfor &clhs-root; in &config-lisp;.
IMPNOTESfor &impnotes-root; in &config-lisp;.
EDITORfor editor-name in
&config-lisp;.LOGICAL_HOST_&host-r;_FROMLOGICAL_HOST_&host-r;_TOLOGICAL_HOST_&host-r;for &load-lpt-db;Input and OututSee .See also&cmucl; - cmucl(1)&emacs; - emacs(1)&xemacs; - xemacs(1)BugsWhen you encounter a bug in &clisp; or in its documentation (this
manual page or ),
please report it to the &clisp;
SourceForge bug tracker.
To ensure that we can get back to you, you will have to login either to
your &sf; account, or to your OpenID
account.Before submitting a bug report, please take
the following basic steps to make the report more useful:Please do a clean build (remove your build directory
and build &clisp; with ./configure --cbc build
or at least do a make distclean
before &make;).If you are reporting a hard crash
(segmentation fault, bus error, core dump etc), please do
./configure &with-debug; --cbc build-g ; cd build-g; gdb
lisp.run, then load the appropriate &linkset; by either
&base; or &full; &gdb; command, and report the backtrace (see also
).If you are using pre-built binaries and experience a
hard crash, the problem is likely to be in the incompatibilities
between the platform on which the binary was built and yours; please
try compiling the sources and report the problem if it persists.
When submitting a bug report, please specify the following
information:What is your platform (uname
-a on a &unix; system)? Compiler version?
&glibc; version (on &gnu;/&linux;)?Where did you get the sources or binaries? When?
(Absolute dates, e.g., 2006-01-17, are preferred over
the relative ones, e.g., 2 days ago).How did you build &clisp;?
(What command, options &c.)What is the output of
clisp
--version?Please supply the full output (copy and paste) of
all the error messages, as well as detailed instructions on how to
reproduce them.ProjectsEnhance the compiler so that it can inline local
functions.Embed &clisp; in &vim;.