1CLISP(1) Platform: x86_64-unknown-linux-gnu CLISP(1)
2
3
4
6 clisp - ANSI Common Lisp compiler, interpreter and debugger.
7
9 clisp [[-h] | [--help]] [--version] [--license] [-help-image]
10 [-B lisp-lib-dir] [-K linking-set] [-M mem-file] [-m memory-size]
11 [-L language] [-N locale-dir] [-Edomain encoding] [[-q] |
12 [--quiet] | [--silent] | [-v] | [--verbose]] [-on-error action]
13 [-repl] [-w] [-I] [[-ansi] | [-traditional]] [-modern]
14 [-p package] [-C] [-norc] [-i init-file...]
15 [-c [-l] lisp-file [-o output-file]...] [-x expressions...]
16 [lisp-file [argument...]]
17
19 Invokes the Common Lisp[1] interpreter and compiler. When called
20 without arguments, executes the read-eval-print loop[2], in which
21 expressions are in turn READ[3] from the standard input, EVAL[4]uated
22 by the lisp interpreter, and their results are PRINT[5]ed to the
23 standard output. Invoked with -c, compiles the specified lisp files to
24 a platform-independent bytecode which can be executed more efficiently.
25
27 -h
28 --help
29 Displays a help message on how to invoke CLISP[6].
30
31 --version
32 Displays the CLISP[6] version number, as given by the function
33 LISP-IMPLEMENTATION-VERSION[7], the value of the variable
34 *FEATURES*, as well some other information.
35
36 --license
37 Displays a summary of the licensing information, the GNU[8] GPL[9].
38
39 -help-image
40 Displays information about the memory image being invoked: whether
41 is it suitable for scripting as well as the :DOCUMENTATION supplied
42 to EXT:SAVEINITMEM.
43
44 -B lisp-lib-dir
45 Specifies the installation directory. This is the directory
46 containing the linking sets and other data files. This option is
47 normally not necessary, because the installation directory is
48 already built-in into the clisp executable. Directory lisp-lib-dir
49 can be changed dynamically using the SYMBOL-MACRO[10]
50 *LIB-DIRECTORY*.
51
52 -K linking-set
53 Specifies the linking set to be run. This is a directory (relative
54 to the lisp-lib-dir) containing at least a main executable
55 (runtime) and an initial memory image. Possible values are
56
57 base
58 the core CLISP[6]
59
60 full
61 core plus all the modules with which this installation was
62 built, see Section 32.2, “External Modules”.
63
64 The default is base.
65
66 -M mem-file
67 Specifies the initial memory image. This must be a memory dump
68 produced by the EXT:SAVEINITMEM function by this clisp runtime. It
69 may have been compressed using GNU[8] gzip[11].
70
71 -m memory-size
72 Sets the amount of memory CLISP[6] tries to grab on startup. The
73 amount may be given as
74
75 nnnnnnn
76 measured in bytes
77
78 nnnnK
79 nnnnKB
80 measured in kilobytes
81
82 nM
83 nMB
84 measured in megabytes
85
86 The default is 3 megabytes. The argument is constrained above 100
87 KB.
88
89 This version of CLISP[6] is not likely to actually use the entire
90 memory-size since garbage-collection will periodically reduce the
91 amount of used memory. It is therefore common to specify 10 MB even
92 if only 2 MB are going to be used.
93
94 -L language
95 Specifies the language CLISP[6] uses to communicate with the user.
96 This may be one of english, german, french, spanish, dutch,
97 russian, danish. Other languages may be specified through the
98 environment variable[12] LANG, provided the corresponding message
99 catalog is installed. The language may be changed dynamically
100 using the SYMBOL-MACRO[10] CUSTOM:*CURRENT-LANGUAGE*.
101
102 -N locale-dir
103 Specifies the base directory of locale files. CLISP[6] will search
104 its message catalogs in locale-dir/language/LC_MESSAGES/clisp.mo.
105 This directory may be changed dynamically using the
106 SYMBOL-MACRO[10] CUSTOM:*CURRENT-LANGUAGE*.
107
108 -Edomain encoding
109 Specifies the encoding used for the given domain, overriding the
110 default which depends on the environment variable[12]s LC_ALL,
111 LC_CTYPE, LANG. domain can be
112
113 file
114 affecting CUSTOM:*DEFAULT-FILE-ENCODING*
115
116 pathname
117 affecting CUSTOM:*PATHNAME-ENCODING*
118
119 terminal
120 affecting CUSTOM:*TERMINAL-ENCODING*
121
122 foreign
123 affecting CUSTOM:*FOREIGN-ENCODING*
124
125 misc
126 affecting CUSTOM:*MISC-ENCODING*
127
128 blank
129 affecting all of the above.
130
131
132 Warning
133 Note that the values of these SYMBOL-MACRO[10]s that have been
134 saved in a memory image are ignored: these SYMBOL-MACRO[10]s are
135 reset based on the OS environment after the memory image is loaded.
136 You have to use the RC file, CUSTOM:*INIT-HOOKS* or init function
137 to set them on startup, but it is best to set the aforementioned
138 environment variable[12]s appropriately for consistency with other
139 programs. See Section 31.1, “Customizing CLISP Process
140 Initialization and Termination”.
141
142 -q
143 --quiet
144 --silent
145 -v
146 --verbose
147 Change verbosity level: by default, CLISP[6] displays a banner at
148 startup and a good-bye message when quitting, and initializes
149 *LOAD-VERBOSE*[13] and *COMPILE-VERBOSE*[14] to T[15], and
150 *LOAD-PRINT*[13] and *COMPILE-PRINT*[14] to NIL[16], as per [ANSI
151 CL standard]. The first -q removes the banner and the good-bye
152 message, the second sets variables *LOAD-VERBOSE*[13] and
153 *COMPILE-VERBOSE*[14] to NIL[16]. The first -v sets variables
154 CUSTOM:*REPORT-ERROR-PRINT-BACKTRACE*, *LOAD-PRINT*[13] and
155 *COMPILE-PRINT*[14] to T[15], the second sets CUSTOM:*LOAD-ECHO* to
156 T[15]. These settings affect the output produced by -i and -c
157 options. Note that these settings persist into the read-eval-print
158 loop[2]. Repeated -q and -v cancel each other, e.g., -q -q -v -v -v
159 is equivalent to -v.
160
161 -on-error action
162 Override (or force) the batch mode imposed by -c, -x, and
163 lisp-file, depending on action:.PP appease
164 continuable[17] ERROR[18]s are turned into WARNING[19]s (with
165 EXT:APPEASE-CERRORS) other ERROR[18]s are handled in the
166 default way
167
168 debug
169 ERROR[18]s INVOKE-DEBUGGER[20] (the normal read-eval-print
170 loop[2] behavior)
171
172 abort
173 continuable[17] ERROR[18]s are appeased, other ERROR[18]s are
174 ABORT[21]ed with EXT:ABORT-ON-ERROR
175
176 exit
177 continuable[17] ERROR[18]s are appeased, other ERROR[18]s
178 terminate CLISP[6] with EXT:EXIT-ON-ERROR
179
180 See also EXT:SET-GLOBAL-HANDLER.
181
182 -repl
183 Start an interactive read-eval-print loop[2] after processing the
184 -c, -x, and lisp-file options and on any ERROR[18] SIGNAL[22]ed
185 during that processing.
186
187 -w
188 Wait for a keypress after program termination.
189
190 -I
191 Interact better with Emacs[23] (useful when running CLISP[6] under
192 Emacs[23] using SLIME[24], ILISP[25] et al). With this option,
193 CLISP[6] interacts in a way that Emacs[23] can deal with:
194
195 · unnecessary prompts are not suppressed.
196
197 · The GNU[8] readline[26] library treats TAB (see TAB key) as a
198 normal self-inserting character (see Q: A.4.5).
199
200 -ansi
201 Comply with the [ANSI CL standard] specification even where
202 CLISP[6] has been traditionally different. It sets the
203 SYMBOL-MACRO[10] CUSTOM:*ANSI* to T[15].
204
205 -traditional
206 Traditional: reverses the residual effects of -ansi in the saved
207 memory image.
208
209 -modern
210 Provides a modern view of symbols: at startup the *PACKAGE*[27]
211 variable will be set to the “CS-COMMON-LISP-USER” package, and the
212 *PRINT-CASE*[28] will be set to :DOWNCASE. This has the effect that
213 symbol lookup is case-sensitive (except for keywords and old-style
214 packages) and that keywords and uninterned symbols are printed with
215 lower-case preferrence. See Section 11.4, “Package Case-
216 Sensitivity”.
217
218 -p package
219 At startup the value of the variable *PACKAGE*[27] will be set to
220 the package named package. The default is the value of
221 *PACKAGE*[27] when the image was saved, normally
222 “COMMON-LISP-USER”[29].
223
224 -C
225 Compile when loading: at startup the value of the variable
226 CUSTOM:*LOAD-COMPILING* will be set to T[15]. Code being LOAD[30]ed
227 will then be COMPILE[31]d on the fly. This results in slower
228 loading, but faster execution.
229
230 -norc
231 Normally CLISP[6] loads the user “run control” (RC)[32] file on
232 startup (this happens after the -C option is processed). The file
233 loaded is .clisprc.lisp or .clisprc.fas in the home directory
234 USER-HOMEDIR-PATHNAME[33], whichever is newer. This option, -norc,
235 prevents loading of the RC file.
236
237 -i init-file
238 Specifies initialization files to be LOAD[30]ed at startup. These
239 should be lisp files (source or compiled). Several -i options can
240 be given; all the specified files will be loaded in order.
241
242 -c lisp-file
243 Compiles the specified lisp-files to bytecode (*.fas). The compiled
244 files can then be LOAD[30]ed instead of the sources to gain
245 efficiency.
246
247 -o outputfile
248 Specifies the output file or directory for the compilation of the
249 last specified lisp-file.
250
251 -l
252 Produce a bytecode DISASSEMBLE[34] listing (*.lis) of the files
253 being compiled. Useful only for debugging. See Section 24.1.1,
254 “Function COMPILE-FILE” for details.
255
256 -x expressions
257 Executes a series of arbitrary expressions instead of a
258 read-eval-print loop[2]. The values of the expressions will be
259 output to *STANDARD-OUTPUT*[35]. Due to the argument processing
260 done by the shell, the expressions must be enclosed in double
261 quotes, and double quotes and backslashes must be escaped with
262 backslashes.
263
264 lisp-file [ argument ... ]
265 Loads and executes a lisp-file, as described in Script execution.
266 There will be no read-eval-print loop[2]. Before lisp-file is
267 loaded, the variable EXT:*ARGS* will be bound to a list of strings,
268 representing the arguments. The first line of lisp-file may start
269 with #!, thus permitting CLISP[6] to be used as a script
270 interpreter. If lisp-file is -, the *STANDARD-INPUT*[35] is used
271 instead of a file.
272
273 This option is disabled if the memory image was created by
274 EXT:SAVEINITMEM with NIL[16] :SCRIPT argument. In that case the
275 LIST[36] EXT:*ARGS* starts with lisp-file.
276
277 This option must be the last one.
278
279 No RC file will be executed.
280
281 As usual, -- stops option processing and places all remaining command
282 line arguments into EXT:*ARGS*.
283
285 The language implemented is ANSI[38][37] Common Lisp[1]. The
286 implementation mostly conforms to the ANSI Common Lisp standard, see
287 Section 31.10, “Maximum ANSI CL compliance”.
288
289 [ANSI CL] ANSI CL standard1994. ANSI Common Lisp standard X3.226-1994 -
290 Information Technology - Programming Language - Common Lisp[39].
291
293 help
294 get context-sensitive on-line help, see Chapter 25, Environment
295 [CLHS-25].
296
297 (APROPOS name)
298 list the SYMBOL[40]s matching name.
299
300 (DESCRIBE symbol)
301 describe the symbol.
302
303 (exit)
304 (quit)
305 (bye)
306 quit CLISP[6].
307
308 EOF (Control+D on UNIX[41])
309 leave the current level of the read-eval-print loop[2] (see also
310 Section 1.1, “Special Symbols [CLHS-1.4.1.3]”).
311
312 arrow keys
313 for editing and viewing the input history, using the GNU[8]
314 readline[26] library.
315
316 TAB key
317 Context sensitive:
318
319 · If you are in the “function position” (in the first symbol
320 after an opening paren or in the first symbol after a #´[43]),
321 the completion is limited to the symbols that name functions.
322
323 · If you are in the "filename position" (inside a string after
324 #P[44]), the completion is done across file names,
325 bash[45]-style.
326
327 · If you have not typed anything yet, you will get a help
328 message, as if by the Help command.
329
330 · If you have not started typing the next symbol (i.e., you are
331 at a whitespace), the current function or macro is DESCRIBEd.
332
333 · Otherwise, the symbol you are currently typing is completed.
334
335
336
338 clisp
339 startup driver (a script or an executable)
340
341 lisp.run
342 lisp.exe
343 main executable (runtime)
344
345 lispinit.mem
346 initial memory image
347
348 config.lisp
349 site-dependent configuration (should have been customized before
350 CLISP[6] was built); see Section 31.12, “Customizing CLISP
351 behavior”
352
353 *.lisp
354 lisp source
355
356 *.fas
357 lisp code, compiled by CLISP[6]
358
359 *.lib
360 lisp source library information, generated by COMPILE-FILE, see
361 Section 24.1.3, “Function REQUIRE”.
362
363 *.c
364 C code, compiled from lisp source by CLISP[6] (see Section 32.3,
365 “The Foreign Function Call Facility”)
366
367 For the CLISP[6] source files, see Chapter 34, The source files of
368 CLISP.
369
371 All environment variable[12]s that CLISP[6] uses are read at most once.
372
373 CLISP_LANGUAGE
374 specifies the language CLISP[6] uses to communicate with the user.
375 The legal values are identical to those of the -L option which can
376 be used to override this environment variable[12].
377
378 LC_CTYPE
379 specifies the locale which determines the character set in use. The
380 value can be of the form language or language_country or
381 language_country.charset, where language is a two-letter ISO 639
382 language code (lower case), country is a two-letter ISO 3166
383 country code (upper case). charset is an optional character set
384 specification, and needs normally not be given because the
385 character set can be inferred from the language and country. This
386 environment variable[12] can be overridden with the -Edomain
387 encoding option.
388
389 LANG
390 specifies the language CLISP[6] uses to communicate with the user,
391 unless it is already specified through the environment variable[12]
392 CLISP_LANGUAGE or the -L option. It also specifies the locale
393 determining the character set in use, unless already specified
394 through the environment variable[12] LC_CTYPE. The value may begin
395 with a two-letter ISO 639 language code, for example en, de, fr.
396
397 HOME
398 USER
399 used for determining the value of the function
400 USER-HOMEDIR-PATHNAME[33].
401
402 SHELL
403 COMSPEC
404 is used to find the interactive command interpreter called by
405 EXT:SHELL.
406
407 TERM
408 determines the screen size recognized by the pretty printer.
409
410 ORGANIZATION
411 for SHORT-SITE-NAME[46] and LONG-SITE-NAME[46] in config.lisp.
412
413 CLHSROOT
414 for CUSTOM:CLHS-ROOT in config.lisp.
415
416 IMPNOTES
417 for CUSTOM:IMPNOTES-ROOT in config.lisp.
418
419 EDITOR
420 for editor-name in config.lisp.
421
422 LOGICAL_HOST_host_FROM
423 LOGICAL_HOST_host_TO
424 LOGICAL_HOST_host
425 for CUSTOM:*LOAD-LOGICAL-PATHNAME-TRANSLATIONS-DATABASE*
426
428 CLISP impnotes
429
430 CMU CL[47] - cmucl(1)
431
432 Emacs[23] - emacs(1)
433
434 XEmacs[48] - xemacs(1)
435
437 When you encounter a bug in CLISP[6] or in its documentation (this
438 manual page or CLISP impnotes), please report it to the CLISP[6]
439 SourceForge bug tracker[49].
440
441 Before submitting a bug report, please take the following basic steps
442 to make the report more useful:
443
444 1. Please do a clean build (remove your build directory and build
445 CLISP[6] with ./configure --build build or at least do a make
446 distclean before make).
447
448 2. If you are reporting a “hard crash” (segmentation fault, bus
449 error, core dump etc), please do ./configure --with-debug --build
450 build-g ; cd build-g; gdb lisp.run, then load the appropriate
451 linking set by either base or full gdb[50] command, and report the
452 backtrace (see also Q: A.1.1.10).
453
454 3. If you are using pre-built binaries and experience a hard crash,
455 the problem is likely to be in the incompatibilities between the
456 platform on which the binary was built and yours; please try
457 compiling the sources and report the problem if it persists.
458
459 When submitting a bug report, please specify the following information:
460
461 1. What is your platform (uname -a on a UNIX[41] system)? Compiler
462 version? GNU[8] libc[51] version (on GNU[8]/Linux[52])?
463
464 2. Where did you get the sources or binaries? When? (Absolute dates -
465 like “2006-01-17” - are preferred over the relative ones - like “2
466 days ago”).
467
468 3. How did you build CLISP[6]? (What command, options &c.)
469
470 4. What is the output of clisp --version?
471
472 5. Please supply the full output (copy and paste) of all the error
473 messages, as well as detailed instructions on how to reproduce
474 them.
475
477 · Enhance the compiler so that it can inline local functions.
478
479 · Add Multi-Threading capabilities, via OS threads.
480
482 Bruno Haible <http://www.haible.de/bruno/>
483 Author.
484
485 Michael Stoll <http://www.faculty.iu-bremen.de/mstoll/>
486 Author.
487
488 Sam Steingold <http://sds.podval.org/>
489 Author.
490
491 See COPYRIGHT (file in the CLISP sources) for the list of other
492 contributors and the license.
493
495 Copyright © 1992-2007 Bruno Haible
496 Copyright © 1998-2007 Sam Steingold
497
499 1. Common Lisp
500 http://www.lisp.org
501
502 2. read-eval-print loop
503 http://www.lisp.org/HyperSpec/Body/sec_25-1-1.html
504
505 3. READ
506 http://www.lisp.org/HyperSpec/Body/fun_readcm_re_g-whitespace.html
507
508 4. EVAL
509 http://www.lisp.org/HyperSpec/Body/fun_eval.html
510
511 5. PRINT
512 http://www.lisp.org/HyperSpec/Body/fun_writecm_p_rintcm_princ.html
513
514 6. CLISP
515 http://clisp.cons.org
516
517 7. LISP-IMPLEMENTATION-VERSION
518 http://www.lisp.org/HyperSpec/Body/fun_lisp-impl_tion-version.html
519
520 8. GNU
521 http://www.gnu.org
522
523 9. GPL
524 http://www.gnu.org/copyleft/gpl.html
525
526 10. SYMBOL-MACRO
527 http://www.lisp.org/HyperSpec/Body/mac_define-symbol-macro.html
528
529 11. gzip
530 http://www.gzip.org/
531
532 12. environment variable
533 basedefs/xbd_chap08.html
534
535 13. *LOAD-VERBOSE*
536 http://www.lisp.org/HyperSpec/Body/var_stload-pr_ad-verbosest.html
537
538 14. *COMPILE-VERBOSE*
539 http://www.lisp.org/HyperSpec/Body/var_stcompile_le-verbosest.html
540
541 15. T
542 http://www.lisp.org/HyperSpec/Body/convar_t.html
543
544 16. NIL
545 http://www.lisp.org/HyperSpec/Body/convar_nil.html
546
547 17. continuable
548 http://www.lisp.org/HyperSpec/Body/glo_c.html#continuable
549
550 18. ERROR
551 http://www.lisp.org/HyperSpec/Body/contyp_error.html
552
553 19. WARNING
554 http://www.lisp.org/HyperSpec/Body/contyp_warning.html
555
556 20. INVOKE-DEBUGGER
557 http://www.lisp.org/HyperSpec/Body/fun_invoke-debugger.html
558
559 21. ABORT
560 http://www.lisp.org/HyperSpec/Body/fun_abortcm_c_cm_use-value.html
561
562 22. SIGNAL
563 http://www.lisp.org/HyperSpec/Body/fun_signal.html
564
565 23. Emacs
566 http://www.gnu.org/software/emacs/
567
568 24. SLIME
569 http://common-lisp.net/project/slime/
570
571 25. ILISP
572 http://sourceforge.net/projects/ilisp/
573
574 26. readline
575 http://cnswww.cns.cwru.edu/~chet/readline/rltop.html
576
577 27. *PACKAGE*
578 http://www.lisp.org/HyperSpec/Body/var_stpackagest.html
579
580 28. *PRINT-CASE*
581 http://www.lisp.org/HyperSpec/Body/var_stprint-casest.html
582
583 29. “COMMON-LISP-USER”
584 http://www.lisp.org/HyperSpec/Body/sec_11-1-2-2.html
585
586 30. LOAD
587 http://www.lisp.org/HyperSpec/Body/fun_load.html
588
589 31. COMPILE
590 http://www.lisp.org/HyperSpec/Body/fun_compile.html
591
592 32. “run
593 control” (RC)
594 http://www.faqs.org/docs/artu/ch10s03.html
595
596 33. USER-HOMEDIR-PATHNAME
597 http://www.lisp.org/HyperSpec/Body/fun_user-homedir-pathname.html
598
599 34. DISASSEMBLE
600 http://www.lisp.org/HyperSpec/Body/fun_disassemble.html
601
602 35. *STANDARD-OUTPUT*
603 http://www.lisp.org/HyperSpec/Body/var_stdebug-i_ace-outputst.html
604
605 36. LIST
606 http://www.lisp.org/HyperSpec/Body/syscla_list.html
607
608 37. ANSI
609 http://www.ansi.org/
610
611 38. The American National Standards Institute
612
613 39. Information Technology - Programming Language - Common Lisp
614 http://www.ncits.org/tc_home/j13sd4.htm
615
616 40. SYMBOL
617 http://www.lisp.org/HyperSpec/Body/syscla_symbol.html
618
619 41. UNIX
620 http://www.UNIX-systems.org/online.html
621
622 42. Win32
623 http://winehq.com/
624
625 43. #'
626 http://www.lisp.org/HyperSpec/Body/sec_2-4-8-2.html
627
628 44. #P
629 http://www.lisp.org/HyperSpec/Body/sec_2-4-8-14.html
630
631 45. bash
632 http://www.gnu.org/software/bash/
633
634 46. SHORT-SITE-NAME
635 http://www.lisp.org/HyperSpec/Body/fun_short-sit_ng-site-name.html
636
637 47. CMU CL
638 http://www.cons.org/cmucl/
639
640 48. XEmacs
641 http://www.xemacs.org
642
643 49. SourceForge bug tracker
644 http://sourceforge.net/tracker/?func=add&group_id=1355&atid=101355
645
646 50. gdb
647 http://sources.redhat.com/gdb/
648
649 51. libc
650 http://www.gnu.org/software/libc/
651
652 52. Linux
653 http://www.linux.org/
654
655
656
657CLISP 2.43 Last modified: 2007-11-18 CLISP(1)