Initial Commit
[packages] / xemacs-packages / ilisp / docs / ilisp.texi
1 \input texinfo    @c -*-texinfo-*-         Last modified: February 20, 2002
2 @setfilename ilisp.info
3 @settitle The ILISP Inferior Lisp Interface
4
5 @dircategory Lisp Programming
6 @direntry
7 * ILisp: (ilisp).       Inferior Lisp mode.
8 @end direntry
9
10 @iftex
11 @finalout
12 @end iftex
13
14 @c  NOTE:  KEYBINDING DESCRIPTIONS IN THIS FILE
15 @c
16 @c  Texinfo doesn't support the functionality of  substitute-command-keys, 
17 @c  which kind of makes things tough when the bindings change.
18 @c
19 @c  Note that all the keys here which use the ILISP prefix have 
20 @c  @key{C-z} before them, so a global replace can be used to put in a
21 @c  specific value for this (if wanted).  The whole string should be
22 @c  rpelaced, as in (replace-string "@key{C-z}" "@key{C-c}").  Any occurrences
23 @c  of this should be in the proper @kbd{} construct, or in a table.
24 @c
25 @c  Key command descriptions in tables have the function listed after
26 @c  them, as in   "@item RET   (return-ilisp)"  so it should be poosible
27 @c  to update these descriptions with a little ELisp code.
28 @c
29 @c  Todd Kaufmann    17-Mar-91
30 @c  toad@cs.cmu.edu
31
32
33 @c ================================================================
34 @c THIS file has the new style title page commands.
35
36 @c Run using special version of `texinfo.tex'.
37 @c Version 2.13 or higher is recommended.
38
39 @c Also, run `makeinfo' rather than `texinfo-format-buffer'.
40 @c (Get the texinfo2 package.)
41 @c ================================================================
42
43 @c Use this if you want small book size like the GNU Emacs bound book.
44 @c smallbook
45
46 @c tex
47 @c \overfullrule=0pt
48 @c end tex
49
50 @comment   INDEX   USAGE:
51 @c  
52 @c      @cindex     concept
53 @c      @findex     function
54 @c      @vindex     variable        
55 @c      @kindex     key
56 @c      @pindex     command     (normally program)
57 @c
58 @c not used:
59 @c      @tindex    (data)type
60
61
62 @c
63 @c Combine indices.
64 @c @synindex cp fn
65 @c @syncodeindex vr fn
66 @c @syncodeindex ky fn
67 @c @syncodeindex pg fn
68 @c @syncodeindex tp fn
69 @c oops: texinfo-format-buffer ignores synindex
70 @c So, use makeinfo.c.  Get texinfo2.tar.Z off of prep.ai.mit.edu
71 @c
72
73 @c TODO:
74 @c - Add doc for rlogin lisps.
75
76
77 @ifinfo
78 This file documents ILISP.
79
80 This is edition 0.23 of the ILISP manual
81 for ILISP Version: 5.12
82
83 @example
84 Copyright (C) 1991,1992,1993 Todd Kaufmann
85               1993,1994 Ivan Vasquez
86               1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
87               1996, 1997, 1998, 1999 Marco Antoniotti and Rick Campbell
88 @end example
89
90 Permission is granted to make and distribute verbatim copies of
91 this manual provided the copyright notice and this permission notice
92 are preserved on all copies.
93
94 Permission is granted to copy and distribute modified versions of this
95 manual under the conditions for verbatim copying, provided that the entire
96 resulting derived work is distributed under the terms of a permission
97 notice identical to this one.
98
99 Permission is granted to copy and distribute translations of this manual
100 into another language, under the above conditions for modified versions,
101 except that this permission notice may be stated in a translation approved
102 by the Foundation.
103 @end ifinfo
104 @c
105
106 @c
107 @setchapternewpage odd
108
109 @titlepage
110 @title ILISP User Manual
111 @subtitle A GNU Emacs Interface for Interacting with Lisp
112 @subtitle Edition 0.23, June 2002
113 @subtitle For ILISP Version: 5.12
114 @c
115 @c the following comment string is removed by the ctrl-c-doc.sh script,
116 @c which can be used to change all ilisp-*prefix* bindings to C-c (or
117 @c other). 
118 @c
119 @comment ctrl-C version: @subtitle This is the ``@key{C-z}'' version of the manual.
120
121 @author by Todd Kaufmann, Chris McConnell, Ivan Vazquez,
122 @author Marco Antoniotti, Rick Campbell
123 @author and Paolo Amoroso
124
125 @page
126 @vskip 0pt plus 1filll
127 Copyright @copyright{} @itemize
128         @item 1991, 1992, 1993 Todd Kaufmann
129         @item 1993, 1994 Ivan Vasquez
130         @item 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
131         @item 1996, 1997, 1998, 1999 Marco Antoniotti and Rick Campbell
132 @end itemize
133
134 @sp 2
135 This is edition 0.23 of the @cite{ILISP User Manual}
136 for ILISP Version: 5.12,
137 June 2002.
138
139 @sp 2
140
141 Permission is granted to make and distribute verbatim copies of
142 this manual provided the copyright notice and this permission notice
143 are preserved on all copies.
144
145 Permission is granted to copy and distribute modified versions of this
146 manual under the conditions for verbatim copying, provided that the entire
147 resulting derived work is distributed under the terms of a permission
148 notice identical to this one.
149
150 Permission is granted to copy and distribute translations of this manual
151 into another language, under the above conditions for modified versions,
152 except that this permission notice may be stated in a translation approved
153 by this author.
154 @end titlepage
155 @page
156
157
158 @node Top, Distribution, (dir), (dir)
159 @comment  node-name,  next,  previous,  up
160
161
162 @ifinfo
163 This Info file documents ILISP, a GNU Emacs interface for a Lisp
164 running in a buffer.
165 @comment ctrl-C version: @sp
166 @comment ctrl-C version: This is the ``@key{C-z}'' version of the manual.
167 @end ifinfo
168
169 @menu
170 * Distribution::                How to get the latest ILISP distribution.
171
172 * Acknowledgements::            Acknowledgements
173 * Introduction::                An introduction to ILISP and its features.
174 * Installation::                How to install ILISP.
175 * Starting up::                 How to run a Lisp process using ILISP.
176
177 * Keybindings::                 A word about the keys used by ILISP.
178 * Buffers of ILISP::            Buffers used by ILISP, and their commands.
179 * ILISP Commands::              
180 * Customization::               Description of ILISP variables and hooks.
181 * Dialects::                    How ILISP knows how to communicate with Lisp,
182                                     and how to define new dialects.
183
184 Indices:
185 * Concept index::               General concepts.
186 * Key index::                   ILISP key sequences.
187 * Command index::               Commands by name.
188 * Variable index::              Variables and hooks that influence ILISP's
189                                                                    behavior.
190
191 * Function index::              Internal Emacs Lisp functions.
192 @end menu
193
194 @node Distribution, Acknowledgements, Top, Top
195 @unnumbered How to get the latest ILISP distribution.
196
197 ILISP is ``free''; this means that everyone is free to use it and free
198 to redistribute it on a free basis.  ILISP is not in the public domain;
199 it is copyrighted and there are restrictions on its distribution, but
200 these restrictions are designed to permit everything that a good
201 cooperating citizen would want to do.  What is not allowed is to try to
202 prevent others from further sharing any version of ILISP that they might
203 get from you.  The precise conditions appears following this section.
204
205 The easiest way to get a copy of ILISP is from someone else who has it.
206 You need not ask for permission to do so, or tell any one else; just
207 copy it.
208
209 General information on ILISP is available at:
210 @example
211 http://ilisp.cons.org/
212 @end example
213
214 The project site, which provides access to the CVS source tree, bug
215 database, mailing lists and other resources, is hosted at SourceForge:
216 @example
217 http://sourceforge.net/projects/ilisp/
218 @end example
219
220 The following mailing lists are available:
221 @table @file
222
223 @item ilisp-announce
224 Subscribe to this list if you want to receive public announcements
225 regarding ILISP.
226 @cindex @code{ilisp-announce} mailing list
227
228 @item ilisp-devel
229 This is the list for people who want to be actively involved in the
230 development of ILISP.
231 @cindex @code{ilisp-devel} mailing list
232
233 @item ilisp-help
234 This is the list for asking usage questions regarding ILISP.
235 @cindex @code{ilisp-help} mailing list
236
237 @item ilisp-cvs
238 Subscribe to this list @emph{only} if you want to monitor the CVS
239 repository activity.
240 @cindex @code{ilisp-cvs} mailing list
241 @end table
242
243 You can subscribe to the lists and access the archives via the general
244 information pages:
245 @itemize @bullet
246 @item
247 @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-announce}
248
249 @item
250 @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-devel}
251
252 @item
253 @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-help}
254
255 @item
256 @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-cvs}
257 @end itemize
258
259 You may send bug reports, questions, suggestions, etc. to
260 @file{ilisp-help} or @file{ilisp-devel}.  To report a bug you can also
261 switch to the buffer where the problem occurs, execute the @code{M-x
262 ilisp-bug} command and follow the displayed instructions. See the file
263 @file{HISTORY} for a list of known bugs and problems.
264 @cindex Mailing lists
265 @cindex Reporting bugs
266 @cindex Bugs, reporting them
267 @cindex @file{HISTORY}
268 @pindex ilisp-bug
269
270 @menu
271 * FTP and Web directions::              FTP and Web directions
272 @end menu
273
274 @node FTP and Web directions, ,  , Distribution
275 @unnumberedsec FTP and Web directions
276 @cindex FTP site
277 @cindex Anonymous FTP
278 @cindex Downloading ILISP
279 @cindex Web site
280 @cindex How to get
281 @cindex Getting ILISP
282 @noindent
283 You can get the distribution file, @code{ilisp-x.y.z.tar.gz}
284 (@code{ilisp-x.y.z.zip}), via HTTP or anonymous FTP at the following
285 addresses:
286
287 @itemize @bullet
288 @item
289 @code{http://sourceforge.net/project/showfiles.php?group_id=3957}
290
291 @item
292 @code{http://www2.cons.org:8000/ftp-area/ilisp/}
293
294 @item
295 @code{ftp://ftp2.cons.org/pub/languages/lisp/ilisp/}
296
297 @end itemize
298
299 If you use a tty ftp client, just log in as 'anonymous'.
300
301 Please report any problems to the @file{ilisp-help} mailing list.
302 @xref{Distribution}.
303 @cindex @code{ilisp-help} mailing list
304
305 @noindent
306 Unpack and install:
307
308 @code{% @dfn{gzip -dc ilisp-x.y.z.tar.gz | tar xf -}}
309
310 @noindent
311 or
312
313 @code{% @dfn{unzip ilisp-x.y.z.zip}}
314
315 @xref{Installation}.
316
317
318 @node Acknowledgements, Introduction, Distribution, Top
319 @unnumbered Acknowledgements
320
321 ILISP replaces the standard inferior Lisp mode.  ILISP is based on
322 comint mode and derived from a number of different interfaces including
323 Symbolics, CMU Common Lisp, and Thinking Machines.  
324
325 There are many people that have taken the time to report bugs, make
326 suggestions and even better send code to fix bugs or implement new
327 features.  
328
329 Thanks to
330 Paolo Amoroso,
331 Martin Atzmueller,
332 David Bakash,
333 Daniel Barlow,
334 Guido Bosch,
335 Tim Bradshaw,
336 David Braunegg,
337 Thomas M. Breuel,
338 Craig Brozefsky,
339 Rick Campbell,
340 Hans Chalupsky,
341 Kimball Collins,
342 William Deakin,
343 Brian Dennis,
344 David Duff,
345 Tom Emerson,
346 Michael Ernst,
347 Scott Fahlman,
348 Karl Fogel,
349 Paul Fuqua (for the CMU-CL GC display code),
350 David Gadbois,
351 Robert P. Goldman,
352 Marty Hall,
353 Richard Harris,
354 Utz-Uwe Haus,
355 Jim Healy,
356 Matthias Hoelzl,
357 Christopher Hoover,
358 Larry Hunter,
359 Ben Hyde,
360 Chuck Irvine,
361 Mark Kantrowitz,
362 Michael Kashket,
363 Matthias Koeppe,
364 Qiegang Long,
365 Christian Lynbech,
366 Erik Naggum,
367 Dan Pierson,
368 Yusuf Pisan,
369 Frank Ritter,
370 Ole Rohne,
371 Jeffrey Mark Siskind,
372 Neil Smithline,
373 Richard Stallman,
374 Larry Stead,
375 Jason Trenouth,
376 Christof Ullwer,
377 Reini Urban,
378 Bjorn Victor,
379 Edmund Weitz,
380 Fred White,
381 Ben Wing,
382 Matsuo Yoshihiro,
383 Jamie Zawinski
384 and many others for bug reports, suggestions and
385 code.  Our apologies to anyone we may have forgotten.
386
387 Special thanks to Todd Kaufmann for the texinfo file, work on bridge,
388 epoch-pop and for really exercising everything.
389
390 Please send bug reports, fixes and extensions to the @file{ilisp-devel}
391 mailing list so that they can be merged into the master
392 source. @xref{Distribution}.
393 @cindex @code{ilisp-devel} mailing list
394 @noindent
395 @example
396 --Chris McConnell                     1991-03-18
397 --Ivan Vazquez                        1993-06-27
398 --Marco Antoniotti and Rick Campbell  1996-10-25
399 --Marco Antoniotti and Paolo Amoroso  1999-08-19
400 @end example
401
402
403 @node Introduction, Installation, Acknowledgements, Top
404 @unnumbered Introduction
405 @cindex features
406
407 ILISP is an interface from GNU Emacs to an inferior Lisp.  It has the
408 following features:
409
410 @itemize @bullet
411 @item
412 Runs under Emacs-18, Emacs-19, Emacs-20, and XEmacs-19.
413
414 @item
415 Support for multiple Common Lisp (including Allegro, CLISP and CMU),
416 XLisp and Scheme dialects on multiple machines even at the same time.
417
418 @item
419 Dynamically sized pop-up windows that can be buried and scrolled from
420 any window.
421
422 @item
423 Packages are properly handled including the distinction between
424 exported and internal symbols.
425
426 @item
427 Synchronous, asynchronous or batch eval and compile of files, regions,
428 definitions and sexps with optional switching and automatic calling.
429
430 @item
431 Arglist, documentation, describe, inspect and macroexpand.
432
433 @item
434 Completion of filename components and Lisp symbols including partial matches.
435
436 @item
437 Find source both with and without help from the inferior Lisp,
438 including CLOS methods, multiple definitions and multiple files.  
439
440
441 @item
442 Edit the callers of a function with and without help from the
443 inferior Lisp.
444
445 @item
446 Trace/untrace a function.
447
448 @item
449 @kbd{M-q} (``Fill-paragraph'') works properly on paragraphs in comments,
450 strings and code.
451
452 @item
453 Find unbalanced parentheses.
454
455 @item
456 Super brackets.
457
458 @item
459 Handles editing, entering and indenting full Lisp expressions.
460
461 @item
462 Next, previous, and similar history mechanism compatible with comint.
463
464 @item
465 Handles Lisp errors.
466
467 @item
468 Uniform interface to Lisp debuggers.
469
470 @item
471 Result histories are maintained in the inferior Lisp.
472
473 @item
474 Does not create spurious symbols and handles case issues.
475
476 @item
477 Online manuals for ILISP and Common Lisp.
478
479 @end itemize
480
481 @node Installation, Starting up, Introduction, Top
482 @chapter How to install ILISP
483 @cindex Installation
484 Installation of ILISP and some initialization of your computing
485 environment are described in this chapter.  Please read the following
486 sections carefully before getting started with ILISP.
487
488 Copy the ILISP distribution archive, e.g. @code{ilisp-x.y.z.tar.gz}, to
489 the location where you would like to install it. Next extract the
490 archive, see @xref{FTP and Web directions}. You may need root privileges to
491 perform these operations.
492
493
494
495 @menu
496 * Configuration and compilation::      
497 * Files of ILISP::              
498 @end menu
499
500 @node  Configuration and compilation, Files of ILISP,  , Installation
501 @comment  node-name,  next,  previous,  up
502 @section Configuration and compilation
503
504 Some configuration needs to be done before compiling the Emacs Lisp
505 files that comprise ILISP.  Start with the @file{Makefile} file, in the
506 section after the comment @code{Various variables} (you can
507 safely ignore the variables for configuring packaging and distribution,
508 which are intended for maintainers).
509
510 First, set the @code{EMACS} variable to be the pathname of the Emacs you
511 will be using ILISP with. This is the Emacs that will be used to compile
512 ILISP with. Be sure to check that @code{LN} and @code{HyperSpec} have
513 appropriate values for your system, @strong{especially if you are a
514 Windows user}.
515
516 @cindex Compiling ILISP files 
517 @cindex Byte-compiling ILISP files
518 @cindex @file{Makefile}
519 @findex ilisp-compile-inits 
520 @vindex EMACS
521 @vindex LN
522 @vindex HyperSpec
523 @vindex ilisp-load-inits
524 @vindex ilisp-site-hook
525 @vindex ilisp-program
526 @vindex ilisp-init-binary-command
527 @vindex ilisp-init-binary-extension
528
529 If your Emacs supports the @code{easymenu} package, it is possible to
530 make ILISP add to Lisp mode buffers and buffers with inferior Lisp
531 processes, or to Scheme mode buffers and buffers with inferior Scheme
532 processes, an @code{Ilisp} menu with all available commands. To enable
533 this feature, set to @code{t} the variable
534 @code{ilisp-*enable-cl-easy-menu-p*} in @file{ilisp-def.el} for the Common
535 Lisp dialects, and @code{ilisp-*enable-scheme-easy-menu-p*} for Scheme
536 dialects. Setting these variables also causes the default @code{Lisp}
537 menu to be removed before displaying the @code{Ilisp} one.
538 @cindex @code{easymenu} package
539 @cindex @code{Ilisp} menu
540 @cindex @code{Lisp} menu
541 @vindex @code{ilisp-*enable-cl-easy-menu-p*}
542 @vindex @code{ilisp-*enable-scheme-easy-menu-p*}
543 @cindex @file{ilisp-def.el}
544
545 See the file @file{INSTALLATION} for additional configuration options
546 and known problems for specific Lisp dialects.
547 @cindex @file{INSTALLATION}
548
549 Run @code{make} or @code{make compile} to build ILISP from source.
550 Ignore any compilation warnings unless they result in ILISP not
551 compiling completely. If you are a Windows user, and you don't have GNU
552 @code{make}, you can still compile ILISP by running the
553 @file{icompile.bat} batch file (be sure to customize for your system the
554 variables mentioned by the comment at the top).
555 @pindex make
556 @pindex make compile
557 @cindex Windows, compiling under
558 @cindex @file{icompile.bat}
559
560 For reducing the Emacs startup time you may run @code{make
561 loadfile}. This concatenates all @file{.elc} (the compiled Emacs Lisp
562 files) into an @file{ilisp-all.elc} file and removes the @file{*.elc}
563 files. So your Emacs can load one single compiled file faster than
564 a bunch of smaller compiled files.
565 @cindex Reducing Emacs startup time
566 @cindex Startup time, how to reduce it
567 @cindex @file{ilisp-all.elc}
568 @pindex make loadfile
569
570 To activate ILISP you should add appropriate Emacs Lisp forms to your
571 @file{.emacs} or to the system-wide @file{default.el} file, depending on
572 who will be using ILISP. These forms take care of starting it whenever
573 you access a Lisp file or run an inferior Lisp process. You can copy
574 relevant portions of the sample file @file{ilisp.emacs}, which also
575 shows how to customize some ILISP features.
576 @cindex @file{ilisp.emacs}
577 @cindex @file{.emacs}
578 @cindex @file{default.el}
579
580 You should add the directory where all of the ILISP Emacs Lisp files
581 reside to your @code{load-path}.  There is an example of this in
582 @file{ilisp.emacs}.
583
584 As an alternative you could set up a @file{.ilisp} which contains the
585 appropriate portions of @file{ilisp.emacs}, in order to avoid cluttering
586 too much @file{.emacs} or @file{default.el}.
587
588 The first time a dialect is started, the interface files will complain
589 about not being compiled, just ignore the message.  Once a Lisp dialect
590 is started up, you should execute the command @code{ilisp-compile-inits}
591 which will compile the @file{*.lisp} files and write them to the same
592 directory as the ILISP files.@refill
593 @pindex ilisp-compile-inits
594 @cindex @file{.lisp} files
595
596 The binary files should have a unique
597 extension for each different combination of architecture and
598 Lisp dialect.  You will need to change
599 @code{ilisp-init-binary-extension} and
600 @code{ilisp-init-binary-command} to get additional
601 extensions.  The binary for each different architecture
602 should be different.  If you want to build the interface
603 files into a Lisp world, you will also need to set
604 @code{ilisp-load-inits} to @code{nil} in the same place that
605 you change @code{ilisp-program} to load the Lisp
606 world.@refill
607
608 There is an @code{ilisp-site-hook} for initializing site specific stuff
609 like program locations when ILISP is first loaded.  You may want to
610 define appropriate autoloads in your system Emacs start up
611 file.
612 @vindex ilisp-site-hook
613
614 Example site init:
615 @example
616 ;;; CMU site
617 (setq ilisp-site-hook
618       '(lambda ()
619         (setq ilisp-motd "CMU ILISP V%s")
620         (setq expand-symlinks-rfs-exists t)
621         (setq allegro-program "/usr/local/acl5/lisp")
622         (setq lucid-program "/usr/misc/.lucid/bin/lisp")))
623 @end example
624
625 Kent Pitman and Xanalys Inc. have made publicly available on the Web the
626 Common Lisp HyperSpec, an HTML version of the full text of the ANSI
627 Common Lisp specification:
628 @example
629 http://www.xanalys.com/software_tools/reference/HyperSpec/
630 @end example
631 It is also possible to get a local copy of the HyperSpec, whose latest
632 version is currently v6, by downloading the file
633 @code{HyperSpec-6-0.tar.gz} from the above mentioned site.
634
635 Daniel Barlow, Stephen Carney and Erik Naggum independently developed
636 Emacs Lisp packages for looking up Lisp symbols in the HyperSpec and
637 displaying the relevant sections with a Web browser. ILISP used to include all
638 of them in the @file{extra} directory of the distribution tree.
639 However, because of some changes to the CLHS only Erik Naggum's
640 version is now distributed.  If you want to use one of the
641 others, please contact the other authors.
642 @cindex ANSI Common Lisp
643 @cindex HyperSpec
644 @cindex Common Lisp HyperSpec
645 @cindex @file{extra}
646 @cindex Common Lisp Manual
647
648 The @file{ilisp.emacs} file provides sample instructions for making
649 Naggum's package access a local copy of the HyperSpec. Since the package
650 relies on the @code{browse-url} Emacs package, make sure that the latter
651 is properly configured.
652 @cindex @file{ilisp.emacs}
653 @cindex @code{browse-url}
654
655 Digital Press has made publicly available online, as a service to the
656 Lisp community, the full text of the book ``Common Lisp, The Language''
657 (by Guy L. Steele Jr., 2nd edition, Digital Press, 1990, ISBN
658 1-55558-041-6; a.k.a. ``CLtL2'') in a number of formats, including HTML.
659 ILISP provides support, contributed by Utz-Uwe Haus, for looking up Lisp
660 symbols in the HTML version of the book and displaying the relevant
661 sections with a Web browser.  See the file @file{extra/cltl2.el} for
662 more information on configuring this feature. @xref{Documentation
663 functions}, for usage instructions.
664 @cindex Common Lisp
665 @cindex CLtL2
666 @cindex Common Lisp Manual
667
668 The @file{ilisp.emacs} file provides sample instructions for making
669 ILISP's CLtL2 support access a local copy of the book.  What has been
670 said above about @code{browse-url} configuration also applies to CLtL2
671 lookup.
672 @cindex @file{ilisp.emacs}
673 @cindex @code{browse-url}
674
675 Note that, althouth Steele's book is a well written and useful resource,
676 it covers the Common Lisp language in the state it was a few years
677 before ANSI standardization.  If you need an accurate description of
678 ANSI Common Lisp, see the above mentioned HyperSpec instead.
679
680 Previous versions of ILISP provided commands for accessing the online
681 Common Lisp documentation shipped with Franz Inc.'s Allegro CL product
682 (@code{fi:clman} module). The public availability of the HyperSpec, and
683 the inclusion since version 5.9 of ILISP of the @code{hyperspec}
684 packages, make access to the Franz documentation no longer necessary. So
685 by default ILISP does not load the @code{fi:clman} module, but if you
686 still want to use its commands set the
687 @code{ilisp-*use-fi-clman-interface-p*} to @code{t} in
688 @file{ilisp-def.el}.
689 @pindex fi:clman
690 @cindex Allegro CL
691 @cindex Franz manual
692 @vindex ilisp-*use-fi-clman-interface-p*
693 @cindex @file{ilisp-def.el}
694
695 The ILISP documentation consists of a user manual and a reference card
696 (the latter may not be up to date). Both of them are in the @file{docs}
697 directory of the distribution tree.
698 @cindex Documentation
699 @cindex @file{docs}
700
701 The generation of GNU Info, DVI, PostScript and HTML versions of the
702 documentation from the Texinfo and TeX source is controlled by the
703 @file{Makefile} in the @file{docs} directory. Run @code{make docs} or
704 just @code{make} to generate all of the formats. If you are interested
705 in only some of them then issue the appropriate command: @code{make
706 info} for GNU Info, @code{make dvi} for DVI, @code{make ps} for
707 PostScript and @code{make html} for HTML. To remove the intermediate
708 files produced during the generation of DVI output you can run
709 @code{make tmpclean}. Note that some of the output formats may not be
710 supported for certain documents.
711 @cindex User manual
712 @cindex @file{Makefile}
713 @cindex @file{docs}
714 @pindex make
715 @pindex make docs
716 @pindex make info
717 @pindex make dvi
718 @pindex make ps
719 @pindex make html
720
721 The ILISP reference card is available as a TeX source file. Check the
722 comments at the beginning of the file if you need to generate a version
723 with a different number of columns (the default is 3).
724 @cindex Reference card
725
726
727 @node Files of ILISP,  , Configuration and compilation, Installation
728 @section Files of ILISP
729 @cindex Files of ILISP
730 The files included with the ILISP distribution are:
731
732 @table @file
733
734 @item bridge.el
735 Process to process communication.
736 @cindex @file{bridge.el}
737
738 @item comint-ipc.el
739 Extensions for sending commands and getting results.
740 @cindex @file{comint-ipc.el}
741
742 @item comint-v18.el
743 The basic comint abstraction.  You only need this if running Emacs-18.
744 @cindex @file{comint.el}
745
746 @item completer.el
747 Partial completion code.
748 @cindex @file{completer.el}
749
750 @item custom-ilisp.el
751 ILISP customization.
752 @cindex @file{custom-ilisp.el}
753
754 @item docs/
755 Directory containing the documentation.
756 @cindex @file{docs}
757
758 @item extra/
759 Directory containing contributed packages.
760 @cindex @file{extra}
761
762 @item icompile.bat
763 Windows batch file for compiling ILISP (useful if you don't have GNU
764 @code{make}).
765 @cindex @file{icompile.bat}
766
767 @item ilcompat.el
768 Compatibility code between FSF-18, FSF-19, FSF-20, LEmacs-19 and XEmacs.
769 @cindex @file{ilcompat.el}
770
771 @item ild.el
772 Uniform interface to Lisp debuggers.
773 @cindex @file{ild.el}
774
775 @item ilfsf18.el
776 Support for GNU Emacs v18.
777 @cindex @file{ilfsf18.el}
778
779 @item ilfsf19.el
780 Support for GNU Emacs v19.
781 @cindex @file{ilfsf19.el}
782
783 @item ilfsf20.el
784 Support for GNU Emacs v20.
785 @cindex @file{ilfsf20.el}
786
787 @item ilisp-acl.el
788 Allegro Common Lisp dialect definition.
789 @cindex @file{ilisp-acl}
790
791 @item ilisp-aut.el
792 Autoload definitions.
793 @cindex @file{ilisp-aut.el}
794
795 @item ilisp-bat.el
796 ILISP batch code module.
797 @cindex @file{ilisp-bat.el}
798
799 @item ilisp-bug.el
800 ILISP bug submittal code.
801 @cindex @file{ilisp-bug.el}
802
803 @item ilisp-ccl.el
804 Corman Common Lisp dialect definition.
805 @cindex @file{ilisp-ccl.el}
806
807 @item ilisp-chs.el
808 Haible and Stoll's CLISP Common Lisp dialect definition.
809 @cindex @file{ilisp-chs.el}
810
811 @item ilisp-cl-easy-menu.el
812 ILISP menu definition (Common Lisp dialects) for the Easymenu package.
813 @cindex @file{ilisp-cl-easy-menu.el}
814
815 @item ilisp-cl.el
816 Common Lisp dialect definition.
817 @cindex @file{ilisp-cl.el}
818
819 @item ilisp-cmp.el
820 ILISP completer related code. 
821 @cindex @file{ilisp-cmp.el}
822
823 @item ilisp-cmt.el
824 Comint related code/setup.
825 @cindex @file{ilisp-cmt.el}
826
827 @item ilisp-cmu.el
828 CMU CL Common Lisp dialect definition.
829 @cindex @file{ilisp-cmu.el}
830
831 @item ilisp-def.el
832 Variable definitions.
833 @cindex @file{ilisp-def.el}
834
835 @item ilisp-dia.el
836 Code for customizing dialects
837 @cindex @file{ilisp-dia.el}
838
839 @item ilisp-doc.el
840 ILISP mode documenation.
841 @cindex @file{ilisp-doc.el}
842
843 @item ilisp-ext.el
844 Standalone lisp-mode extensions.
845 @cindex @file{ilisp-ext.el}
846
847 @item ilisp-hi.el
848 High level interface code.
849 @cindex @file{ilisp-hi.el}
850
851 @item ilisp-hlw.el
852 Xanalys/Harlequin LispWorks Common Lisp dialect definition.
853 @cindex @file{ilisp-hlw.el}
854
855 @item ilisp-hnd.el
856 Error handling.
857 @cindex @file{ilisp-hnd.el}
858
859 @item ilisp-imenu.el
860 ILISP specific code for imenu.
861 @cindex @file{ilisp-imenu.el}
862
863 @item ilisp-ind.el
864 Indentation code.
865 @cindex @file{ilisp-ind.el}
866
867 @item ilisp-inp.el
868 Buffer input module.
869 @cindex @file{ilisp-inp.el}
870
871 @item ilisp-kcl.el
872 Kyoto Common Lisp dialect definition.
873 @cindex @file{ilisp-kcl.el}
874
875 @item ilisp-key.el
876 Keymap setups, including @code{ilisp-lispm-bindings}.
877 @cindex @file{ilisp-key.el}
878
879 @item ilisp-kil.el
880 Interface to reset/kill/abort inferior Lisp.
881 @cindex @file{ilisp-kil.el}
882
883 @item ilisp-low.el
884 Low level interface code.
885 @cindex @file{ilisp-low.el}
886
887 @item ilisp-luc.el
888 Lucid/Liquid Common Lisp dialect definition.
889 @cindex @file{ilisp-luc.el}
890
891 @item ilisp-mak.el
892 Code for supporting the ILISP build process.
893 @cindex @file{ilisp-mak.el}
894
895 @item ilisp-menu.el
896 Menu definitions.
897 @cindex @file{ilisp-menu.el}
898
899 @item ilisp-mnb.el
900 Menubar definition code.
901 @cindex @file{ilisp-mnb.el}
902
903 @item ilisp-mod.el
904 ILISP mode definition.
905 @cindex @file{ilisp-mod.el}
906
907 @item ilisp-mov.el
908 Buffer-point movement code.
909 @cindex @file{ilisp-mov.el}
910
911 @item ilisp-openmcl.el
912 OpenMCL dialect definition.
913 @cindex @file{ilisp-openmcl.el}
914
915 @item ilisp-out.el
916 Output handling, include typeout window (a popper replacement).
917 @cindex @file{ilisp-out.el}
918
919 @item ilisp-prc.el
920 Process handling code.
921 @cindex @file{ilisp-prc.el}
922
923 @item ilisp-prn.el
924 Parenthesis handling.
925 @cindex @file{ilisp-prn.el}
926
927 @item ilisp-rng.el
928 Match ring code.
929 @cindex @file{ilisp-rng.el}
930
931 @item ilisp-s2c.el
932 Scheme->C Scheme dialect definition.
933 @cindex @file{ilisp-s2c.el}
934
935 @item ilisp-sbcl.el
936 Steel Bank Common Lisp dialect definition.
937 @cindex @file{ilisp-sbcl.el}
938
939 @item ilisp-sch.el
940 Scheme dialects definitions.
941 @cindex @file{ilisp-sch.el}
942
943 @item ilisp-scheme-easy-menu.el
944 ILISP menu definition (Scheme dialects) for the Easymenu package.
945 @cindex @file{ilisp-scheme-easy-menu.el}
946
947 @item ilisp-snd.el
948 ilisp-send definitions and associated code.
949 @cindex @file{ilisp-snd.el}
950
951 @item ilisp-src.el
952 ILISP source code module.
953 @cindex @file{ilisp-src.el}
954
955 @item ilisp-sym.el
956 ILISP symbol handling.
957 @cindex @file{ilisp-sym.el}
958
959 @item ilisp-utl.el
960 Misc. utilities.
961 @cindex @file{ilisp-utl.el}
962
963 @item ilisp-val.el
964 Buffer value interface.
965 @cindex @file{ilisp-val.el}
966
967 @item ilisp-xfr.el 
968 Transfer between Lisp <-> Emacs code.
969 @cindex @file{ilisp-xfr.el }
970
971 @item ilisp-xls.el
972 XLisp and XLisp-Stat dialects definitions.
973 @cindex @file{ilisp-xls.el}
974
975 @item ilisp.el
976 File to be loaded, loads in all necessary parts of ILISP.
977 @cindex @file{ilisp.el}
978
979 @item ilisp.emacs
980 File with sample @file{.emacs} code for ILISP.
981 @cindex @file{ilisp.emacs}
982
983 @item ilisp.texi
984 Texinfo file for ILISP.
985 @cindex @file{ilisp.texi}
986
987 @item illuc19.el
988 Support for Lucid Emacs v19.
989 @cindex @file{illuc19.el}
990
991 @item ilxemacs.el
992 Support for XEmacs.
993 @cindex @file{ilxemacs.el}
994
995 @item *.lisp
996 Support code for Common Lisp.  Each dialect will have one of these
997 files.
998 @cindex @file{.lisp} files
999
1000 @item *.scm
1001 Support code for Scheme.  Each dialect will have one of these files.
1002 @cindex @file{.scm} files
1003
1004 @end table
1005
1006 @cindex @file{.el} files 
1007
1008
1009 @c ==================================================================
1010 @node Starting up, Keybindings, Installation, Top
1011 @chapter How to run a Lisp process using ILISP
1012 @cindex Running Lisp
1013 @cindex Starting up Lisp
1014 @cindex Supported dialects
1015 @cindex Dialects supported
1016 @pindex run-ilisp
1017 @pindex common-lisp
1018 @cindex Common Lisp
1019 @pindex allegro
1020 @cindex Allegro CL
1021 @pindex lucid
1022 @cindex Lucid Common Lisp
1023 @pindex cmulisp
1024 @cindex CMU Common Lisp
1025 @pindex clisp-hs
1026 @cindex CLISP
1027 @pindex kcl
1028 @cindex Kyoto Common Lisp
1029 @pindex akcl
1030 @cindex Austin Kyoto Common Lisp
1031 @pindex gcl
1032 @cindex GNU Common Lisp
1033 @pindex ecl
1034 @cindex EcoLisp
1035 @pindex ibcl
1036 @cindex Ibuki Common Lisp
1037 @pindex scheme
1038 @cindex Scheme
1039 @pindex oaklisp
1040 @cindex Oaklisp
1041 @pindex sbcl
1042 @cindex SB Common Lisp
1043 @cindex SCM
1044 @pindex scm
1045 @cindex Chez Scheme
1046 @pindex chez
1047 @cindex STk
1048 @pindex stk
1049 @cindex Snow
1050 @pindex snow
1051 @cindex GUILE
1052 @pindex guile
1053 @cindex MzScheme
1054 @pindex mzscheme
1055 @cindex DrScheme-jr
1056 @pindex drscheme-jr
1057 @pindex xlisp
1058 @cindex XLisp
1059 @pindex xlispstat
1060 @cindex XLisp-Stat
1061 @pindex openmcl
1062 @cindex OpenMCL
1063 @pindex cormanlisp
1064 @cindex Corman Lisp
1065
1066 To start a Lisp use @kbd{M-x run-ilisp}, or a specific dialect like
1067 @kbd{M-x allegro}.  If called with a prefix you will be prompted for a
1068 buffer name and a program to run.  The default buffer name is the name
1069 of the dialect.  The default program for a dialect will be the value of
1070 DIALECT-program or the value of ilisp-program inherited from a less
1071 specific dialect.  If there are multiple Lisp's, use the dialect name or
1072 @kbd{M-x select-ilisp} (@kbd{@key{C-z} S}) to select the current ILISP
1073 buffer.
1074
1075 Entry into ILISP mode runs the hooks on @code{comint-mode-hook} and
1076 @code{ilisp-mode-hook} and then DIALECT-hooks specific to Lisp
1077 dialects in the nesting order above.  Many dialects call
1078 @code{ilisp-load-init} in their dialect setup.  
1079
1080 These are the currently supported dialects.
1081
1082 @itemize @bullet
1083 @item @code{allegro}
1084 Allegro Common Lisp from Franz Inc.
1085
1086 @item @code{akcl}
1087 Austin Kyoto Common Lisp, the U. Texas derivative.
1088
1089 @item @code{chez}
1090 Chez Scheme by Cadence Research Systems.
1091
1092 @item @code{clisp-hs}
1093 CLISP by Haible and Stoll.
1094
1095 @item @code{cmucl}
1096 CMU Common Lisp, the major development platform for ILISP so far.
1097
1098 @item @code{cormanlisp}
1099 Corman Common Lisp by Roger Corman.
1100
1101 @item @code{drscheme-jr}
1102 DrScheme-jr by Rice University's PLT.
1103
1104 @item @code{common-lisp}
1105 Generic Common Lisp.
1106
1107 @item @code{ecl}
1108 EcoLisp, the Embeddable Common Lisp by Beppe Attardi. A derivative of
1109 KCL and AKCL.
1110
1111 @item @code{gcl}
1112 GNU Common Lisp, the official GNU release. A derivative of AKCL.
1113
1114 @item @code{guile}
1115 GUILE Scheme by the GNU Project.
1116
1117 @item @code{ibcl}
1118 Ibuki Common Lisp, derived from KCL.
1119
1120 @item @code{kcl}
1121 Kyoto Common Lisp, original version.
1122
1123 @item @code{liquid}
1124 Liquid Common Lisp, the successor of Lucid Common Lisp supported by
1125 Xanalys/Harlequin Ltd.
1126
1127 @item @code{lispworks}
1128 LispWorks Common Lisp from Xanalys/Harlequin Ltd.
1129
1130 @item @code{lucid}
1131 Lucid Common Lisp, currently supported by Xanalys/Harlequin Ltd.
1132
1133 @item @code{mzscheme}
1134 MzScheme by Rice University's PLT.
1135
1136 @item @code{oaklisp}
1137 Oaklisp scheme.
1138
1139 @item @code{openmcl}
1140 OpenMCL.
1141
1142 @item @code{sbcl}
1143 Steel Bank Common Lisp
1144
1145 @item @code{scheme}
1146 Generic Scheme.
1147
1148 @item @code{scm}
1149 SCM Scheme by Aubrey Jeffer.
1150
1151 @item @code{snow}
1152 Snow, STk Scheme without supoort for the Tk toolkit.
1153
1154 @item @code{stk}
1155 STk scheme by Erick Gallesio.
1156
1157 @item @code{xlisp}
1158 XLisp by David Betz.
1159
1160 @item @code{xlispstat}
1161 XLisp-Stat, a derivative of XLisp for statistical computations.
1162 @end itemize
1163
1164 @emph{Support for Scheme and XLisp dialects is experimental} and your
1165 feedback is welcome. The @file{ilisp-s2c.el} file contains a first cut
1166 at defining the Scheme->C dialect, but it is neither compiled nor loaded
1167 by ILISP.
1168 @cindex XLisp
1169 @cindex XLisp-Stat
1170 @cindex Scheme->C
1171 @cindex @file{ilisp-s2c.el}
1172
1173 To define a new dialect, @xref{Defining new dialects}, and
1174 @xref{Customization}. If anyone figures out support for other dialects,
1175 I would be happy to include it in future releases.  @xref{Dialects}.
1176
1177 The currently supported dialects are listed below so that the
1178 indentation correponds to the hierarchical relationship between
1179 dialects:
1180 @example
1181  common-lisp
1182    allegro
1183    clisp-hs
1184    cmulisp
1185    cormanlisp
1186    kcl
1187      akcl
1188        gcl
1189        ecl
1190      ibcl
1191    lispworks
1192    lucid
1193      liquid
1194    openmcl
1195    sbcl
1196  scheme
1197    chez
1198    guile
1199    mzscheme
1200      drscheme-jr
1201    oaklisp
1202    Scheme->C (still "in fieri")
1203    scm
1204    snow
1205    stk
1206  xlisp
1207    xlispstat
1208 @end example
1209
1210
1211 @c ==================================================================
1212 @node Keybindings, Buffers of ILISP, Starting up, Top
1213 @chapter A word about the keys used by ILISP
1214 @cindex keybindings
1215 @cindex FSF keyspace
1216 @vindex ilisp-*use-fsf-compliant-keybindings*
1217
1218 By default, most ILISP commands are bound under the prefix key
1219 @key{C-z}.  Unfortunately, these bindings predate the modern FSF Emacs
1220 keyspace policies, which stipulate that packages should use @key{C-c} as
1221 a prefix, and bind only control characters, digits, and a few specific
1222 punctuation chars under that prefix.
1223
1224 If you are already accustomed to the old ILISP bindings, don't worry --
1225 we haven't changed the default.  However, for new users who don't have
1226 old habits to unlearn, ILISP offers FSF-compliant bindings as an
1227 alternative to the default.  To be compliant (and who wouldn't want to
1228 be compliant?), put this line in your @file{.emacs} or in the
1229 system-wide @file{default.el} file:
1230
1231 @example
1232    (setq ilisp-*use-fsf-compliant-keybindings* t)
1233 @end example
1234
1235 This will cause the ILISP prefix key to be @key{C-c}, and also change
1236 some of the bindings underneath that prefix.  After you do this, ILISP
1237 will be almost fully FSF-compliant; there are still a few bindings that
1238 technically violate the FSF policy, but we left them as they were
1239 because we judged that changing them would not have been an improvement.
1240
1241 Because the rest of this document was originally written for the old,
1242 default ILISP bindings, you'll need to make some mental translations if
1243 you choose FSF-compliance:
1244
1245 @itemize @bullet
1246
1247 @item
1248 Everywhere you see @key{C-z} given as a prefix key, substitute @key{C-c}.
1249
1250 @item
1251 If the second part of the keybinding is a plain alphabetic character,
1252 the modern binding is (usually) the same character with the
1253 @kbd{Control} key held down.  Thus, the old keybinding (given in full)
1254 @kbd{@key{C-z} w} would be @kbd{@key{C-c} C-w} in the new system.
1255
1256 @item
1257 If the second part of the keybinding is @emph{already} a @kbd{Control}
1258 character, then translate it to the corresponding @kbd{Meta} character
1259 instead (because many of the former control characters were evicted by
1260 the change described in the previous item).  Thus, the old
1261 @kbd{@key{C-z} C-n} is now @kbd{@key{C-c} M-n}.
1262
1263 @end itemize
1264
1265 Where possible, the new bindings follow the above rules, but note that
1266 some exceptions were necessary.  Most notably, the old @kbd{@key{C-c} *}
1267 bindings are all under @kbd{@key{C-c} 8} now.  The remaining exceptions
1268 are probably best discovered through regular use, as they tend to occur
1269 on obscure keys anyway.  Remember that you can type @kbd{C-h m} at any
1270 time to see help on the current major mode, which will show (among other
1271 things) a list of all currently active keybindings.
1272
1273 @c ==================================================================
1274 @node Buffers of ILISP, ILISP Commands, Keybindings, Top
1275 @chapter Buffers used by ILISP, and their commands
1276 @cindex buffers of ILISP
1277 @cindex ILISP buffers
1278 @table @code
1279
1280 @item *@var{dialect}*
1281 The Lisp listener buffer.  Forms can be entered in this buffer in, and
1282 they will be sent to Lisp when you hit return if the form is complete.
1283 This buffer is in ilisp-mode, which is built on top of comint-mode, and
1284 all comint commands such as history mechanism and job control are
1285 available.
1286 @c  xref..
1287
1288 @item @var{lisp-mode-buffers}
1289 A buffer is assumed to contain Lisp source code if its major mode is in
1290 the list @code{lisp-source-modes}.  If it's loaded into a buffer that is
1291 in one of these major modes, it's considered a Lisp source file by
1292 @code{find-file-lisp}, @code{load-file-lisp} and
1293 @code{compile-file-lisp}.
1294 Used by these commands to determine defaults.@refill
1295
1296 @item @code{*Completions*}
1297 @cindex @code{*Completions*} buffer
1298 Used for listing completions of symbols or files by the completion commands.
1299 @xref{Completion}.
1300
1301 @item *Aborted Commands*
1302 @cindex @code{*Aborted Commands*} buffer
1303 @xref{Interrupts}.
1304
1305 @item *Errors*
1306 @itemx *Output*
1307 @itemx *Error Output*
1308 @cindex @code{*Error Output*} buffer
1309 @cindex @code{*Errors*} buffer
1310 @cindex @code{*Output*} buffer
1311 used to pop-up results and errors from the inferior Lisp.
1312
1313 @item *ilisp-send*
1314 @cindex @code{*ilisp-send*} buffer
1315 Buffer containing the last form sent to the inferior Lisp.
1316
1317 @item *Edit-Definitions*
1318 @itemx *All-Callers*
1319 @cindex @code{*Edit-Definitions*} buffer
1320 @cindex @code{*All-Callers*} buffer
1321 @xref{Source code commands}.
1322
1323 @item *Last-Changes*
1324 @itemx *Changed-Definitions*
1325 @cindex @code{*Last-Changes*} buffer
1326 @cindex @code{*Changed-Definitions*} buffer
1327 @xref{Batch commands}.
1328 @end table
1329
1330 @menu
1331 * Typeout windows::              temporary windows used for display.
1332 * Switching buffers::           Switching buffers
1333 @end menu
1334
1335 @node Typeout windows, Switching buffers,  , Buffers of ILISP
1336 @section Typeout windows
1337 @cindex  Typeout windows
1338
1339 All ILISP output is funneled through the function which is bound to 
1340 the hook @code{ilisp-display-output-function}.  The function gets
1341 a single argument, a string, and should make that output visible to
1342 the user somehow.
1343
1344 One possible choice for output display is
1345 @code{ilisp-display-output-in-typeout-window},
1346 which pops up a window at the top of the current screen which is
1347 just large enough to display the output.  This window can be
1348 ``remotely controlled'' by the commands @code{ilisp-scroll-output},
1349 @code{ilisp-bury-output}, and @code{ilisp-grow-output}.
1350
1351 Unlike the old popper facility, the ilisp typeout window facility
1352 does not trounce on any existing Emacs functions or on any common
1353 key bindings, like @kbd{C-x o}.
1354
1355 Other built-in functions which might be useful as values for 
1356 @code{ilisp-display-output-function} include
1357 @code{ilisp-display-output-default},
1358 @code{ilisp-display-output-adaptively},
1359 @code{ilisp-display-output-in-lisp-listener},
1360 @code{ilisp-display-output-in-temp-buffer}, and
1361 @code{ilisp-display-output-in-typeout-window}.
1362
1363 The default display function is @code{ilisp-display-output-default},
1364 which obeys the @code{lisp-no-popper} variable.
1365
1366 Users are encouraged to write their own output display functions 
1367 to get the exact desired behavior, displaying on a private Emacs
1368 screen, in a pop-up dialog box, or whetever.
1369
1370
1371 @table @kbd
1372
1373 @item @key{C-z} 1   (ilisp-bury-output)
1374 deletes and buries the typeout output window.
1375 @kindex @key{C-z} 1
1376 @pindex ilisp-bury-output
1377 @cindex bury output window
1378
1379
1380 @item @key{C-z} v   (ilisp-scroll-output)
1381 scrolls the output window if it is showing, otherwise does nothing.
1382 If it is called with a negative prefix, it will scroll backwards.
1383 @cindex scrolling output
1384 @pindex ilisp-scroll-output
1385 @kindex @key{C-z} v
1386
1387 @item @key{C-z} G   (ilisp-grow-output)
1388 will grow the output window if showing by the prefix number of lines.
1389 @cindex grow output window
1390 @pindex ilisp-grow-output
1391 @kindex @key{C-z} G
1392
1393 @end table
1394
1395 An alternative to typeout windows is to always have the inferior Lisp
1396 buffer visible and have all output go there.  Setting
1397 @code{lisp-no-popper} to @code{t} will cause all output to go to the
1398 inferior Lisp buffer.  Setting @code{lisp-no-popper} to @code{'message}
1399 will make output of one line go to the message window. Setting
1400 @code{comint-always-scroll} to @code{t} will cause process output to
1401 always be visible.  If a command gets an error, you will be left in the
1402 break loop.@refill
1403
1404 @cindex Turning off typeout windows
1405 @vindex comint-always-scroll
1406 @vindex lisp-no-popper
1407
1408
1409
1410 @node Switching buffers,  ,Typeout windows, Buffers of ILISP
1411 @section Switching buffers
1412
1413 Commands to make switching between buffers easier.
1414 @cindex Switching buffers
1415
1416 @table @kbd
1417 @item @key{C-z} b   (switch-to-lisp)
1418 @kindex @key{C-z} b
1419 @pindex switch-to-lisp
1420 will pop to the current ILISP buffer or if already in an ILISP buffer,
1421 it will return to the buffer that last switched to an ILISP buffer.
1422 With a prefix, it will also go to the end of the buffer.  If you do not
1423 want it to pop, set @code{pop-up-windows} to nil.
1424 @vindex pop-up-windows
1425
1426
1427 @item M-C-l   (previous-buffer-lisp)
1428 will switch to the last visited buffer in the current window or the Nth
1429 previous buffer with a prefix.
1430 @cindex Previous lisp buffer
1431 @pindex previous-buffer-lisp
1432 @kindex M-C-l
1433
1434 @end table
1435
1436
1437 @node ILISP Commands, Customization, Buffers of ILISP, Top
1438 @chapter ILISP Commands
1439
1440
1441 Most of these key bindings work in both Lisp Mode and ILISP mode.
1442 There are a few additional and-go bindings found in Lisp Mode.
1443
1444
1445 @menu
1446 * Eval and compile functions::  
1447 * Documentation functions::     
1448 * Macroexpansion::              
1449 * Tracing functions::           
1450 * Package Commands::            
1451 * Source code commands::        Working on several files
1452 * Batch commands::              Grouping changes for eval/compile
1453 * Files and directories::       
1454 * Keyboard modes::              Interactive and raw keyboard modes
1455 * Interrupts::                  Interrupts, aborts, and errors
1456 * Debuggers::                   Interface to Lisp debuggers
1457 * Command history::             
1458 * Completion::                  
1459 * Miscellany::                  Indentation, parenthesis balancing,
1460                                   and comment commands.
1461 @end menu
1462
1463 @node Eval and compile functions, Documentation functions,  , ILISP Commands
1464 @section Eval and compile functions
1465 @cindex Eval/compile commands
1466 @cindex Compile/eval commands
1467
1468 In Lisp, the major unit of interest is a form, which is anything between
1469 two matching parentheses.  Some of the commands here also refer to
1470 ``defun,'' which is a list that starts at the left margin in a Lisp
1471 buffer, or after a prompt in the ILISP buffer.  These commands refer to
1472 the ``defun'' that contains the point.
1473 @cindex Defun
1474
1475 ``A call'' refers to a reference to a function call for a function or
1476 macro, or a reference to a variable.  Commands which ``insert a call''
1477 in the ILISP buffer will bring up the last command which matches it or
1478 else will insert a template for a call.
1479 @cindex Call
1480
1481 When an eval is done of a single form matching @code{ilisp-defvar-regexp}
1482 the corresponding symbol will be unbound and the value assigned again.
1483 @vindex ilisp-defvar-regexp
1484
1485 When you send a form to Lisp, the status light will reflect the progress
1486 of the command.  In a Lisp mode buffer the light will reflect the status
1487 of the currently selected inferior Lisp unless @code{lisp-show-status}
1488 is nil. The very first inferior Lisp command executed may send some
1489 forms to initialize the inferior Lisp. If you want to find out what
1490 command is currently running, use the command @kbd{@key{C-z} s}
1491 (status-lisp).  If you call it with a prefix, the pending commands will
1492 be displayed as well.@refill
1493 @cindex Currently running command
1494 @cindex Displaying commands
1495 @pindex status-lisp
1496 @kindex @key{C-z} s
1497 @vindex lisp-show-status
1498 @cindex Status light
1499 @cindex Modeline status
1500
1501 Note that in this table as elsewhere, the key @key{C-z} (ilisp-*prefix*)
1502 is used as a prefix character for ILISP commands, though this may be
1503 changed.
1504 @kindex @key{C-z} prefix
1505 @vindex ilisp-*prefix*
1506 @c xref .. custom? or autoload?
1507 For a full list of key-bindings, use @kbd{M-x describe-mode} or
1508 @kbd{M-x describe-bindings} while in an ILISP-mode buffer.@refill
1509 @cindex Listing bindings
1510 @cindex Describing bindings
1511
1512
1513 The eval/compile commands verify that their expressions are balanced and
1514 then send the form to the inferior Lisp.  If called with a positive
1515 prefix, the result of the operation will be inserted into the buffer
1516 after the form that was just sent.
1517 @cindex Inserting results
1518
1519 For commands which operate on a region, the result of the compile or eval
1520 is the last form in the region.
1521 @cindex Region commands
1522
1523 The @samp{and-go} versions will perform the operation and then
1524 immediately switch to the ILISP buffer where you will see the results of
1525 executing your form.  If @code{eval-defun-and-go-lisp} or
1526 @code{compile-defun-and-go-lisp} is called with a prefix, a call for the
1527 form will be inserted as well.@refill
1528 @cindex Inserting calls
1529 @pindex compile-defun-and-go-lisp
1530 @pindex eval-defun-and-go-lisp
1531 @cindex @samp{and-go} functions
1532
1533 @table @kbd
1534
1535 @item @key{C-z}
1536 The prefix-key for most ILISP commands.  This can be changed by setting
1537 the variable @code{ilisp-*prefix*}.
1538 @c xref custom?
1539
1540 @item RET   (return-ilisp)
1541 In ILISP-mode buffer, sends the current form to lisp if complete,
1542 otherwise creates a new line and indents.  If you edit old input, the
1543 input will be copied to the end of the buffer first and then sent.
1544 @cindex Sending input to Lisp
1545 @pindex return-ilisp
1546 @kindex RET
1547
1548 @item C-]   (close-and-send-lisp)
1549 Closes the current sexp, indents it, and then sends it to the current
1550 inferior Lisp.
1551 @pindex close-and-send-lisp
1552 @kindex C-]
1553
1554 @item LFD   (newline-and-indent-lisp)
1555 Insert a new line and then indent to the appropriate level.  If called
1556 at the end of the inferior Lisp buffer and an sexp, the sexp will be
1557 sent to the inferior Lisp without a trailing newline.
1558 @pindex newline-and-indent-lisp
1559 @kindex LFD
1560
1561 @item @key{C-z} e   (eval-defun-lisp)
1562 @itemx M-C-x   (eval-defun-lisp)
1563 @itemx @key{C-z} C-e   (eval-defun-and-go-lisp)
1564 @kindex M-C-x
1565 @kindex @key{C-z} e
1566 @kindex @key{C-z} C-e
1567 Send the defun to Lisp.
1568 @pindex eval-defun-and-go-lisp
1569 @pindex eval-defun-lisp
1570
1571 @item @key{C-z} r   (eval-region-lisp)
1572 @itemx @key{C-z} C-r   (eval-region-and-go-lisp)
1573 @kindex @key{C-z} r
1574 @pindex eval-region-lisp
1575 @kindex @key{C-z} C-r
1576 @pindex eval-region-and-go-lisp
1577 @cindex Eval region
1578
1579 @item @key{C-z} n   (eval-next-sexp-lisp)
1580 @itemx @key{C-z} C-n   (eval-next-sexp-and-go-lisp)
1581 @kindex @key{C-z} n
1582 @pindex eval-next-sexp-lisp
1583 @kindex @key{C-z} C-n
1584 @pindex eval-next-sexp-and-go-lisp
1585
1586 @item @key{C-z} c   (compile-defun-lisp)
1587 @kindex @key{C-z} c
1588 @pindex compile-defun-lisp
1589 @item @key{C-z} C-c   (compile-defun-lisp-and-go)
1590 @kindex @key{C-z} C-c
1591 When @code{compile-defun-lisp} is called in an inferior Lisp buffer with
1592 no current form, the last form typed to the top-level will be compiled.
1593 @cindex Compile last form
1594 @pindex compile-defun-lisp-and-go
1595
1596 @item @key{C-z} w   (compile-region-lisp)
1597 @itemx @key{C-z} C-w   (compile-region-and-go-lisp)
1598 @kindex @key{C-z} w
1599 @pindex compile-region-lisp
1600 @kindex @key{C-z} C-w
1601 @pindex compile-region-and-go-lisp
1602 @cindex Compile region
1603
1604 @end table
1605
1606
1607 If any of the forms contain an interactive command, then the command
1608 will never return.  To get out of this state, you need to use
1609 @code{abort-commands-lisp} (@kbd{@key{C-z} g}).  If @code{lisp-wait-p}
1610 is t, then EMACS will display the result of the command in the
1611 minibuffer or a pop-up window.  If @code{lisp-wait-p} is @code{nil},
1612 (the default) the send is done asynchronously and the results will be
1613 brought up only if there is more than one line or there is an error.  In
1614 this case, you will be given the option of ignoring the error, keeping
1615 it in another buffer or keeping it and aborting all pending sends.  If
1616 there is not a command already running in the inferior Lisp, you can
1617 preserve the break loop.  If called with a negative prefix, the sense of
1618 @code{lisp-wait-p} will be inverted for the next command.
1619 @c @cindex Aborting commands
1620 @vindex lisp-wait-p
1621 @kindex @key{C-z} g
1622 @pindex abort-commands-lisp
1623
1624
1625
1626 @node Documentation functions, Macroexpansion, Eval and compile functions, ILISP Commands
1627 @section Documentation functions
1628
1629 @code{describe-lisp}, @code{inspect-lisp}, @code{arglist-lisp}, and
1630 @code{documentation-lisp} switch whether they prompt for a response or
1631 use a default when called with a negative prefix.  If they are
1632 prompting, there is completion through the inferior Lisp by using
1633 @kbd{TAB} or @kbd{M-TAB}.  When entering an expression in the
1634 minibuffer, all of the normal ILISP commands like @code{arglist-lisp}
1635 also work.@refill
1636 @cindex Describing Lisp objects
1637 @kindex M-TAB
1638 @kindex TAB
1639 @cindex Negative prefix
1640 @cindex Minibuffer completion
1641 @pindex describe-lisp
1642 @cindex Documentation Functions
1643
1644 Commands that work on a function will use the nearest previous function
1645 symbol.  This is either a symbol after a @samp{#'} or the symbol at the
1646 start of the current list.
1647
1648 The @code{fi:clman} and @code{fi:clman-apropos} commands for accessing
1649 the Franz Allegro CL documentation are not enabled by default.
1650 @xref{Configuration and compilation}.
1651 @cindex Allegro CL
1652 @cindex Franz manual
1653
1654 @table @code
1655
1656 @item @key{C-z} a   (arglist-lisp)
1657 @cindex Arglist Lisp
1658 @kindex @key{C-z} a
1659 @pindex arglist-lisp
1660 Return the arglist of the current function.  With a numeric prefix, the
1661 leading paren will be removed and the arglist will be inserted into the
1662 buffer.
1663
1664 @item @key{SPC}   (ilisp-arglist-message-lisp-space)
1665 @cindex Arglist Lisp
1666 @kindex @key{SPC}
1667 @pindex ilisp-arglist-message-lisp-space
1668 @vindex ilisp-*arglist-message-lisp-space-p*
1669 Display the value of the argument list of a symbol followed by
1670 @key{SPC}. @emph{To enable this feature you have to set
1671 @code{ilisp-*arglist-message-lisp-space-p*} to @code{t}.}
1672
1673 @item @key{C-z} d   (documentation-lisp)
1674 @kindex @key{C-z} d
1675 @pindex documentation-lisp
1676 Infers whether function or variable documentation is desired.  With a
1677 negative prefix, you can specify the type of documentation as well.
1678 With a positive prefix the documentation of the current function call is
1679 inserted into the buffer.
1680
1681 @item @key{C-z} i   (describe-lisp)
1682 @kindex @key{C-z} i
1683 Describe the previous sexp (it is evaluated).  If there is no previous
1684 sexp and if called from inside an ILISP buffer, the previous result will
1685 be described.
1686
1687 @item @key{C-z} I   (inspect-lisp)
1688 @kindex @key{C-z} I
1689 @pindex inspect-lisp
1690 Switch to the current inferor Lisp and inspect the previous sexp (it is
1691 evaluated).  If there is no previous sexp and if called from inside an
1692 ILISP buffer, the previous result will be inspected.
1693
1694 @item @key{C-z} H   (hyperspec-lookup)
1695 @kindex @key{C-z} H
1696 @pindex hyperspec-lookup
1697 Look up a standard symbol in the Common Lisp HyperSpec and display the
1698 relevant section.
1699 @cindex HyperSpec
1700 @cindex Common Lisp HyperSpec
1701
1702 @item @key{C-z} L or @key{C-z} M-l   (cltl2-lookup)
1703 @kindex @key{C-z} L
1704 @kindex @key{C-z} M-l
1705 @pindex cltl2-lookup
1706 Look up a Common Lisp symbol in the CLtL2 book and display the relevant
1707 section.
1708 @cindex CLtL2
1709
1710 @item @key{C-z} D   (fi:clman)
1711 @itemx @key{C-z} A   (fi:clman-apropos)
1712 @kindex @key{C-z} D
1713 @pindex fi:clman
1714 @kindex @key{C-z} A
1715 @pindex fi:clman-apropos
1716 If the Franz online Common Lisp manual is available, get information on
1717 a specific symbol.  @code{fi:clman-apropos} will get information apropos
1718 a specific string.  Some of the documentation is specific to the Allegro
1719 dialect, but most of it is for standard Common Lisp.
1720 @cindex Apropos help
1721 @cindex Common Lisp manual
1722 @cindex Franz manual
1723
1724 @end table
1725
1726
1727 @node Macroexpansion, Tracing functions, Documentation functions, ILISP Commands
1728 @section Macroexpansion
1729
1730 @table @kbd
1731 @item @key{C-z} M   (macroexpand-lisp)
1732 @itemx @key{C-z} m   (macroexpand-1-lisp)
1733 @kindex @key{C-z} M
1734 @pindex macroexpand-lisp
1735 @kindex @key{C-z} m
1736 @pindex macroexpand-1-lisp
1737 These commands apply to the next sexp.  If called with a positive
1738 numeric prefix, the result of the macroexpansion will be inserted into
1739 the buffer.  With a negative prefix, prompts for expression to expand.
1740 @cindex Expanding macro forms
1741 @cindex Macroexpansion
1742
1743
1744 @end table
1745
1746 @node Tracing functions, Package Commands, Macroexpansion, ILISP Commands
1747 @section Tracing functions
1748
1749 @table @kbd
1750 @item @key{C-z} t   (trace-defun-lisp)
1751 @kindex @key{C-z} t
1752 @pindex trace-defun-lisp
1753 @cindex Tracing defuns
1754 @cindex Untracing defuns
1755 traces the current defun.   When called with a numeric prefix the
1756 function will be untraced.  When called with negative prefix, prompts
1757 for function to be traced.
1758 @item @key{C-z} C-t   (trace-defun-lisp-break)
1759 @kindex @key{C-z} C-t
1760 @pindex trace-defun-lisp-break
1761 @cindex Tracing defuns
1762 @cindex Untracing defuns
1763 traces the current defun and enters the debugger whenever that function
1764 is invoked.  When called with a numeric prefix the function will be
1765 untraced.  When called with negative prefix, prompts for function to be
1766 traced.
1767 @end table
1768
1769 @node Package Commands, Source code commands, Tracing functions, ILISP Commands
1770 @section Package Commands
1771 @cindex Package commands
1772
1773 The first time an inferior Lisp mode command is executed in a Lisp Mode
1774 buffer, the package will be determined by using the regular expression
1775 @code{ilisp-hash-form-regexp} to find a package sexp and then passing that
1776 sexp to the inferior Lisp through @code{ilisp-package-command}.  For the
1777 @samp{common-lisp} dialect, this will find the first @code{(in-package
1778 PACKAGE)} form in the file.  A buffer's package will be displayed in the
1779 mode line.  If a buffer has no specification, forms will be evaluated in
1780 the current inferior Lisp package.@refill
1781
1782 Buffer package caching can be turned off by setting the variable
1783 @code{lisp-dont-cache-package} to @code{T}.  This will force ILISP to
1784 search for the closest previous "in-package" form corresponding to
1785 @code{ilisp-hash-form-regexp} in the buffer each time an inferior Lisp
1786 mode command is executed. 
1787 @cindex Buffer package
1788 @cindex Buffer package caching
1789 @vindex lisp-dont-cache-package
1790 @vindex ilisp-hash-form-regexp
1791 @findex ilisp-package-command
1792 @cindex In-package form
1793
1794 @table @code
1795
1796 @item @key{C-z} P   (set-package-lisp)
1797 @kindex @key{C-z} P
1798 @pindex set-package-lisp
1799 Set the inferior Lisp package to the current buffer's package or with a
1800 prefix to a manually entered package.
1801
1802 @item @key{C-z} p   (set-buffer-package-lisp)
1803 @kindex @key{C-z} p
1804 @cindex Set buffer package
1805 @pindex set-buffer-package-lisp
1806 Set the buffer's package from the buffer.  If it is called with a
1807 prefix, the package can be set manually.
1808
1809 @end table
1810
1811 @node Source code commands, Batch commands, Package Commands, ILISP Commands
1812 @section Source Code Commands
1813 @cindex Source Code Commands
1814 @cindex Finding source
1815
1816 The following commands all deal with finding things in source code.
1817 The first time that one of these commands is used, there may be some
1818 delay while the source module is loaded.  When searching files, the
1819 first applicable rule is used:
1820 @itemize @bullet
1821 @item
1822 try the inferior Lisp,
1823 @item
1824 try a tags file if defined,
1825 @item
1826 try all buffers in one of @code{lisp-source-modes} or all files
1827 defined using @code{lisp-directory}.@refill
1828 @pindex lisp-directory
1829 @vindex lisp-source-modes
1830 @end itemize
1831
1832 @code{M-x lisp-directory} defines a set of files to be
1833 searched by the source code commands.  It prompts for a directory and
1834 sets the source files to be those in the directory that match entries
1835 in @code{auto-mode-alist} for modes in @code{lisp-source-modes}.
1836 With a positive
1837 prefix, the files are appended.  With a negative prefix, all current
1838 buffers that are in one of @code{lisp-source-modes} will be searched.  This
1839 is also what happens by default.  Using this command stops using a
1840 tags file.@refill
1841 @cindex Source modes
1842 @vindex auto-mode-alist
1843 @kindex M-x lisp-directory
1844
1845 @code{edit-definitions-lisp}, @code{who-calls-lisp}, and
1846 @code{edit-callers-lisp} will switch whether they prompt for a response
1847 or use a default when called with a negative prefix.  If they are
1848 prompting, there is completion through the inferior Lisp by using
1849 @kbd{TAB} or @kbd{M-TAB}.  When entering an expression in the
1850 minibuffer, all of the normal ILISP commands like @kbd{arglist-lisp}
1851 also work.@refill
1852 @pindex edit-callers-lisp
1853 @pindex who-calls-lisp
1854 @pindex edit-definitions-lisp
1855
1856 @code{edit-definitions-lisp} (@kbd{M-.}) will find a
1857 particular type of definition for a symbol.  It tries to use the rules
1858 described above.  The files to be searched are listed in the buffer
1859 @code{*Edit-Definitions*}.  If @code{lisp-edit-files} is nil, no search will be
1860 done if not found through the inferior Lisp.  The variable
1861 @code{ilisp-locator} contains a function that when given the name and type
1862 should be able to find the appropriate definition in the file.  There
1863 is often a flag to cause your Lisp to record source files that you
1864 will need to set in the initialization file for your Lisp.  The
1865 variable is @code{*record-source-files*} in both allegro and lucid.  Once a
1866 definition has been found, @code{next-definition-lisp}
1867 (@kbd{M-,}) will find the next definition
1868 (or the previous definition with a prefix).@refill
1869 @pindex next-definition-lisp
1870 @vindex *record-source-files*
1871 @vindex ilisp-locator
1872 @vindex lisp-edit-files
1873 @cindex @code{*Edit-Definitions*} buffer
1874 @kindex M-.
1875
1876 @code{edit-callers-lisp} (@kbd{@key{C-z} ^}) will generate a list of all
1877 of the callers of a function in the current inferior Lisp and edit the
1878 first caller using @code{edit-definitions-lisp}.  Each successive call to
1879 @code{next-caller-lisp} (@kbd{M-`}) will edit the next caller
1880 (or the previous caller with a prefix).  The list is stored in the
1881 buffer @code{*All-Callers*}.  You can also look at the callers by doing
1882 @kbd{M-x who-calls-lisp}.@refill
1883 @cindex List callers
1884 @cindex Find callers
1885 @cindex @code{*All-Callers*} buffer
1886 @kindex M-x who-calls-lisp
1887 @kindex M-`
1888 @pindex next-caller-lisp
1889 @kindex @key{C-z} ^
1890 @pindex edit-callers-lisp
1891
1892 @code{search-lisp} (@kbd{M-?}) will search the current tags files,
1893 @code{lisp-directory} files or buffers in one of @code{lisp-source-modes} for a
1894 string or a regular expression when called with a prefix.
1895 @code{next-definition-lisp} (@kbd{M-,}) will find the next definition
1896 (or the previous definition with a prefix).@refill
1897 @cindex Next definition
1898 @cindex Previous definition
1899 @kindex M-,
1900 @pindex next-definition-lisp
1901 @kindex M-?
1902 @pindex search-lisp
1903
1904 @code{replace-lisp} (@kbd{M-"}) will replace a string (or a regexp with
1905 a prefix) in the current tags files, @code{lisp-directory} files or
1906 buffers in one of @code{lisp-source-modes}.@refill
1907 @cindex Replace lisp
1908 @kindex M-"
1909 @pindex replace-lisp
1910
1911
1912 Here is a summary of the above commands (behavior when given prefix
1913 argument is given in parentheses):
1914
1915 @table @code
1916 @item M-x lisp-directory
1917 Define a set of files to be used by the source code commands.
1918
1919 @item M-.   (edit-definitions-lisp)
1920 Find definition of a symbol.
1921
1922 @item M-,   (next-definition-lisp)
1923 Find next (previous) definition.
1924
1925 @item @key{C-z} ^   (edit-callers-lisp)
1926 Find all callers of a function, and edit the first.
1927
1928 @item M-`   (next-caller-lisp)
1929 Edit next (previous) caller of function set by @code{edit-callers-lisp}.
1930
1931 @item M-x who-calls-lisp
1932 List all the callers of a function.
1933
1934
1935 @item M-?   (search-lisp)
1936 Search for string (regular expression) in current tags,
1937 @code{lisp-directory} files or buffers.  Use @code{next-definition-lisp}
1938 to find next occurence.
1939
1940 @item M-"   (replace-lisp)
1941 Replace a string (regular expression) in files.
1942
1943 @end table
1944
1945
1946 @node Batch commands, Files and directories, Source code commands, ILISP Commands
1947 @section Batch commands
1948
1949
1950 The following commands all deal with making a number of changes all at
1951 once.  The first time one of these commands is used, there may be some
1952 delay as the module is loaded.  The eval/compile versions of these
1953 commands are always executed asynchronously.
1954 @cindex Group changes
1955 @cindex File changes
1956 @cindex Change commands
1957
1958 @code{mark-change-lisp} (@kbd{@key{C-z} SPC}) marks the current defun as
1959 being changed.  A prefix causes it to be unmarked.  @code{clear-changes-lisp}
1960 (@kbd{@key{C-z} * 0}) will clear all of the changes.
1961 @code{list-changes-lisp} (@kbd{@key{C-z} * l}) will show the forms
1962 currently marked.@refill
1963 @cindex Marking changes
1964 @cindex Clearing changes
1965 @cindex Listing changes
1966 @kindex @key{C-z} * l
1967 @kindex @key{C-z} * 0
1968 @kindex @key{C-z} SPC
1969 @pindex list-changes-lisp
1970 @pindex clear-changes-lisp
1971 @pindex mark-change-lisp
1972
1973 @code{eval-changes-lisp} (@kbd{@key{C-z} * e}), or
1974 @code{compile-changes-lisp} (@kbd{@key{C-z} * c}) will
1975 evaluate or compile these changes as appropriate.
1976 If called with a positive prefix, the changes will be kept.
1977 If there is an error, the process will stop and show the error
1978 and all remaining changes will remain in the list.  All of the results
1979 will be kept in the buffer @code{*Last-Changes*}.@refill
1980 @cindex Eval'ing changes
1981 @cindex Compiling changes
1982 @cindex @code{*Last-Changes*} buffer
1983 @kindex @key{C-z} * e
1984 @kindex @key{C-z} * c
1985 @pindex compile-changes-lisp
1986 @pindex eval-changes-lisp
1987
1988 @noindent
1989 Summary:
1990
1991 @table @code
1992 @item @key{C-z} SPC   (mark-change-lisp)
1993 Mark (unmark) current defun as changed.
1994 @item @key{C-z} * e   (eval-changes-lisp)
1995 @itemx @key{C-z} * c   (compile-changes-lisp)
1996 Call with a positive prefix to keep changes.
1997 @item @key{C-z} * 0   (clear-changes-lisp)
1998 @item @key{C-z} * l   (list-changes-lisp)
1999 @end table
2000
2001
2002 @node Files and directories, Keyboard modes, Batch commands, ILISP Commands
2003 @section Files and directories
2004
2005 @cindex Files and directories
2006 @cindex Directories and files
2007 @cindex Current directory
2008 File commands in Lisp source-mode buffers keep track of the last used
2009 directory and file.  If the point is on a string, that will be the
2010 default if the file exists.  If the buffer is one of
2011 @code{lisp-source-modes}, the buffer file will be the default.  Otherwise,
2012 the last file used in a lisp-source-mode will be used.
2013
2014
2015 @table @kbd
2016 @item C-x C-f   (find-file-lisp)
2017 @kindex C-x C-f
2018 @cindex Find file
2019 @cindex Lisp find file
2020 @cindex Symbolic link expansion
2021 @pindex find-file-lisp
2022 will find a file.  If it is in a string, that will be used as the
2023 default if it matches an existing file.  Symbolic links are expanded so
2024 that different references to the same file will end up with the same
2025 buffer.
2026
2027 @item @key{C-z} l   (load-file-lisp)
2028 @kindex @key{C-z} l
2029 will load a file into the inferior Lisp.  You will be given the
2030 opportunity to save the buffer if it has changed and to compile the file
2031 if the compiled version is older than the current version. For
2032 @file{<whatever>.system} files, which are used by DEFSYSTEM tools, no
2033 compilation or loading of possibly existing
2034 @file{<whatever>.binary-extension} is attempted.
2035 @pindex load-file-lisp
2036 @cindex Loading files
2037 @cindex DEFSYSTEM files
2038 @cindex System definition files
2039
2040 @item @key{C-z} k   (compile-file-lisp)
2041 @kindex @key{C-z} k
2042 will compile a file in the current inferior Lisp.
2043 @pindex compile-file-lisp
2044 @cindex Compiling files
2045
2046 @item @key{C-z} !   (default-directory-lisp)
2047 @kindex @key{C-z} !
2048 sets the default inferior Lisp directory to the directory of the current
2049 buffer.  If called in an inferior Lisp buffer, it sets the Emacs
2050 @code{default-directory} to the Lisp default directory.
2051 @vindex default-directory
2052 @cindex Default directory
2053 @cindex Set default directory
2054 @pindex default-directory-lisp
2055
2056 @end table
2057
2058 @node Keyboard modes, Interrupts, Files and directories, ILISP Commands
2059 @section Switching between interactive and raw keyboard modes
2060
2061 @cindex Raw keyboard mode
2062 @cindex Interactive keyboard mode
2063 @vindex ilisp-raw-echo
2064
2065 There are two keyboard modes for interacting with the inferior Lisp,
2066 ``interactive'' and ``raw''.  Normally you are in interactive mode
2067 where keys are interpreted as commands to EMACS and nothing is sent to
2068 the inferior Lisp unless a specific command does so.  In raw mode, all
2069 characters are passed directly to the inferior Lisp without any
2070 interpretation as EMACS commands.  Keys will not be echoed unless
2071 ilisp-raw-echo is T.
2072
2073 @pindex raw-keys-ilisp
2074 @kindex @key{C-z} #
2075 @pindex io-bridge-ilisp
2076 @kindex M-x io-bridge-ilisp
2077
2078 Raw mode can be turned on interactively by the command
2079 @code{raw-keys-ilisp} (@kbd{@key{C-z} #}) and will continue until you
2080 type @key{C-g}.  Raw mode can also be turned on/off by inferior Lisp
2081 functions if the command @code{io-bridge-ilisp} (@code{M-x
2082 io-bridge-ilisp}) has been executed in the inferior Lisp either
2083 interactively or on a hook.  To turn on raw mode, a function should
2084 print @code{^[1^]} and to turn it off should print @code{^[0^]}.  An
2085 example in Common Lisp would be:
2086
2087 @code{(progn (format t "^[1^]") (print (read-char)) (format t "^[0^]"))}
2088
2089 @node Interrupts, Debuggers, Keyboard modes, ILISP Commands
2090 @section Interrupts, aborts, and errors
2091
2092
2093 If you want to abort the last command you can use @kbd{C-g}.
2094 @kindex C-g
2095 @cindex Errors
2096 @cindex Aborting commands
2097 @cindex Interrupting commands
2098
2099 If you want to abort all commands, you should use the command
2100 @code{abort-commands-lisp} (@kbd{@key{C-z} g}).  Commands that are
2101 aborted will be put in the buffer @code{*Aborted Commands*} so that
2102 you can see what was aborted.  If you want to abort the currently
2103 running top-level command, use @code{interrupt-subjob-ilisp} (@kbd{C-c
2104 C-c}).  As a last resort, @kbd{M-x panic-lisp} will reset the ILISP
2105 state without affecting the inferior Lisp so that you can see what is
2106 happening.
2107
2108 @pindex interrupt-subjob-ilisp
2109 @cindex @code{*Aborted Commands*} buffer
2110 @kindex @key{C-z} g
2111 @pindex abort-commands-lisp
2112 @pindex panic-lisp
2113
2114 @code{delete-char-or-pop-ilisp} (@kbd{C-d}) will delete
2115 prefix characters unless you are at the end of an ILISP buffer in
2116 which case it will pop one level in the break loop.
2117 @cindex Pop in break loop
2118 @cindex Break loop
2119 @kindex C-d
2120 @pindex delete-char-or-pop-ilisp
2121
2122 @code{reset-ilisp}, (@kbd{@key{C-z} z}) will reset the current inferior
2123 Lisp's top-level so that it will no longer be in a break loop.
2124 @cindex Resetting Lisp
2125 @cindex Top-level, return to
2126 @kindex @key{C-z} z
2127 @pindex reset-ilisp
2128
2129
2130 Summary:
2131
2132 @table @kbd
2133 @item C-c C-c   (interrupt-subjob-ilisp)
2134 Send a keyboard interrupt signal to lisp.
2135 @item @key{C-z} g    (abort-commands-lisp)
2136 Abort all running or unsent commands.
2137 @item M-x panic-lisp (panic-lisp)
2138 Reset the ILISP process state.
2139 @item @key{C-z} z   (reset-ilisp)
2140 Reset Lisp to top-level.
2141 @item C-d   (delete-char-or-pop-ilisp)
2142 If at end of buffer, pop a level in break loop.
2143
2144 @end table
2145
2146 @c duplicated from eval section.
2147 If @code{lisp-wait-p} is @code{nil}  (the default),
2148 all sends are done asynchronously and the results will be
2149 brought up only if there is more than one line or there is an error.
2150 In case, you will be given the option of ignoring the error, keeping
2151 it in another buffer or keeping it and aborting all pending sends.
2152 If there is not a command already running in the inferior Lisp, you can
2153 preserve the break loop.  If called with a negative prefix, the sense of
2154 @code{lisp-wait-p} will be inverted for the next command.
2155 @vindex lisp-wait-p
2156
2157
2158
2159 @node Debuggers, Command history, Interrupts, ILISP Commands
2160 @section Interface to Lisp debuggers
2161 @cindex Debugger interface
2162 @cindex Interface to Lisp debuggers
2163 @cindex ILD
2164
2165 ILD is an interface to Lisp debuggers, currently the ones of the AKCL,
2166 Allegro, CLISP, CMU CL, Corman Lisp and Lucid Common Lisp dialects. It
2167 uses a standard set of single-keystroke commands to interface to a
2168 variety of different debuggers and is vaguely modelled after the
2169 Symbolics debugger. It provides two key advantages: single keystrokes
2170 for moving up and down the stack, and a uniform interface to different
2171 debuggers.
2172
2173 Not all debugger commands are available in all implementations. Some
2174 are, but further work is needed. These are noted in the code (see the
2175 dialect definition files). If you know how to fix them please contact
2176 the ILISP maintainer.
2177
2178 Here is a list of the available ILD commands:
2179
2180 @table @kbd
2181 @item M-a   (ild-abort)
2182 Abort.
2183 @pindex ild-abort
2184 @kindex M-a
2185 @cindex Aborting from a debugger
2186 @item M-c   (ild-continue)
2187 Continue.
2188 @pindex ild-continue
2189 @kindex M-c
2190 @cindex Continuing from a debugger
2191 @item M-C-n   (ild-next)
2192 Next stack frame (with numeric argument @emph{n}, move to the next
2193 @emph{n}-th stack frame).
2194 @pindex ild-next
2195 @kindex M-C-n
2196 @cindex Next stack frame
2197 @cindex Stack frames
2198 @item M-C-p   (ild-previous)
2199 Previous stack frame (with numeric argument @emph{n}, move to the
2200 previous @emph{n}-th stack frame).
2201 @pindex ild-previous
2202 @kindex M-C-p
2203 @cindex Previous stack frame
2204 @cindex Stack frames
2205 @item C-c <   (ild-top)
2206 Top stack frame.
2207 @pindex ild-top
2208 @kindex C-c <
2209 @cindex Top stack frame
2210 @cindex Stack frames
2211 @item C-c >   (ild-bottom)
2212 Bottom stack frame.
2213 @pindex ild-bottom
2214 @kindex C-c >
2215 @cindex Bottom stack frame
2216 @cindex Stack frames
2217 @item M-b   (ild-backtrace)
2218 Backtrace.
2219 @pindex ild-backtrace
2220 @kindex M-b
2221 @cindex Stack backtrace
2222 @cindex Backtrace
2223 @item M-C-d   (ild-locals)
2224 Display all local variables.
2225 @pindex ild-locals
2226 @kindex M-C-d
2227 @cindex Displaying local variables
2228 @cindex Local variables
2229 @item M-C-l   (ild-local)
2230 Display a particular local variable (with numeric argument @emph{n},
2231 display the @emph{n}-th local variable).
2232 @pindex ild-local
2233 @kindex M-C-l
2234 @cindex Displaying local variables
2235 @cindex Local variables
2236 @item M-C-s   (ild-step)
2237 Step to the next breakpoint.
2238 @pindex ild-step
2239 @kindex M-C-s
2240 @cindex Stepping to next breakpoint
2241 @item C-c r   (ild-return)
2242 Return.
2243 @pindex ild-return
2244 @kindex C-c r
2245 @cindex Returning from a debugger
2246 @item M-C-r   (ild-retry)
2247 Retry.
2248 @pindex ild-retry
2249 @kindex M-C-r
2250 @cindex Retrying from a debugger
2251 @item C-x t   (ild-trap-on-exit)
2252 Trap on exit.
2253 @pindex ild-trap-on-exit
2254 @kindex C-x t
2255 @cindex Trapping on exit from a debugger
2256 @item C-c L   (select-lisp)
2257 Select Lisp interaction buffer.
2258 @pindex select-lisp
2259 @kindex C-c L
2260 @cindex Selecting a Lisp interaction buffer
2261 @item @key{C-z} C-s   (slow-lisp)
2262 Set compiler options for maximal debuggability.
2263 @pindex slow-lisp
2264 @kindex @key{C-z} C-s
2265 @cindex Setting compiler options
2266 @cindex Compiler options
2267 @item @key{C-z} C-f   (fast-lisp)
2268 Set compiler options for fastest but least debuggable code.
2269 @pindex fast-lisp
2270 @kindex @key{C-z} C-f
2271 @cindex Setting compiler options
2272 @cindex Compiler options
2273 @end table
2274
2275
2276
2277 @node Command history, Completion, Debuggers, ILISP Commands
2278 @section Command history
2279 @cindex Command history
2280 @cindex Last command
2281 @cindex Previous commands
2282
2283 ILISP mode is built on top of @code{comint-mode}, the general
2284 command-interpreter-in-a-buffer mode.  As such, it inherits many
2285 commands and features from this, including a command history mechanism.
2286 @cindex @code{comint-mode}
2287
2288 Each ILISP buffer has a command history associated with it.  Commands
2289 that do not match @code{ilisp-filter-regexp} and that are longer than
2290 @code{ilisp-filter-length} and that do not match the immediately prior
2291 command will be added to this history.
2292 @vindex ilisp-filter-length
2293 @vindex ilisp-filter-regexp
2294
2295 @table @kbd
2296
2297 @item M-n   (comint-next-input)
2298 @itemx M-p   (comint-previous-input)
2299 @kindex M-n
2300 @pindex comint-next-input
2301 @cindex Next input
2302 @kindex M-p
2303 @pindex comint-previous-input
2304 Cycle through the input history.
2305
2306 @item M-s    (comint-previous-similar-input)
2307 @kindex M-s
2308 @pindex comint-previous-similar-input
2309 @cindex Similar input
2310 Cycle through input that has the string typed so far as a prefix.
2311
2312 @item M-N    (comint-psearch-input)
2313 @kindex M-N
2314 @pindex comint-psearch-input
2315 @cindex Search input
2316 @cindex Input search
2317 Search forwards for prompt.
2318 @item M-P    (comint-msearch-input)
2319 @kindex M-P
2320 @pindex comint-msearch-input
2321 Search backwards for prompt.
2322
2323 @item C-c R   (comint-msearch-input-matching)
2324 @kindex C-c R
2325 @pindex comint-msearch-input-matching
2326 Search backwards for occurrence of prompt followed by string which is prompted
2327 for (@emph{not} a regular expression).
2328 @end table
2329
2330 See @code{comint-mode} documentation for more information on
2331 @samp{comint} commands.
2332
2333
2334 @node Completion, Miscellany, Command history, ILISP Commands
2335 @section Completion
2336
2337 Commands to reduce number of keystrokes.
2338 @cindex Completion
2339 @cindex Partial completion
2340 @cindex Filename completion
2341
2342 @table @kbd
2343 @item M-TAB   (complete-lisp)
2344 @kindex M-TAB
2345 @pindex complete-lisp
2346 @vindex ilisp-*prefix-match*
2347 will try to complete the previous symbol in the current inferior Lisp.
2348 Partial completion is supported unless @code{ilisp-*prefix-match*} is set to @code{t}.
2349 (If you set it to @code{t}, inferior Lisp completions will be faster.)
2350 With partial completion, @samp{p--n} would complete to
2351 @samp{position-if-not} in Common Lisp.
2352 If the symbol follows a left paren or a @samp{#'}, only symbols with
2353 function cells will be considered.
2354 If the symbol starts with a @samp{*} or you call with a
2355 positive prefix all possible completions will be considered.
2356 Only external symbols are considered if there is a package qualification
2357 with only one colon.
2358 The first time you try to complete a string the longest common substring
2359 will be inserted and the cursor will be left
2360 on the point of ambiguity.
2361 If you try to complete again, you can see the possible completions.
2362 If you are in a string, then filename completion will be done instead.
2363 And if you try to complete a filename twice, you will see a list of
2364 possible completions. 
2365 Filename components are completed individually, so @samp{/u/mi/} could
2366 expand to @samp{/usr/misc/}. 
2367 If you complete with a negative
2368 prefix, the most recent completion (symbol or filename) will be undone.@refill
2369
2370
2371 @item  M-RET   (complete)
2372 @kindex  M-RET
2373 @pindex complete
2374 @cindex TMC completion
2375 will complete the current symbol to the most recently seen symbol in
2376 Emacs that matches what you have typed so far.  Executing it repeatedly
2377 will cycle through potential matches.  This is from the TMC completion
2378 package and there may be some delay as it is initially loaded.
2379
2380 @end table
2381
2382 @node Miscellany,  , Completion, ILISP Commands
2383 @section Miscellany
2384
2385 Indentation, parenthesis balancing, movement and comment commands.
2386
2387 @table @kbd
2388
2389 @item @kbd{TAB}   (indent-line-ilisp)
2390 @kindex @kbd{TAB}
2391 indents for Lisp.  With prefix, shifts rest of expression rigidly with
2392 the current line.
2393 @pindex indent-line-ilisp
2394 @cindex Indentation
2395 @cindex Rigid indentation
2396
2397
2398 @item M-C-q   (indent-sexp-ilisp)
2399 @kindex M-C-q
2400 will indent each line in the next sexp.
2401 @pindex indent-sexp-ilisp
2402
2403 @item M-q   (reindent-lisp)
2404 @kindex M-q
2405 will reindent the current paragraph if in a comment or string.
2406 Otherwise it will close the containing defun and reindent it.
2407 @pindex reindent-lisp
2408 @cindex Reindent lisp
2409
2410 @item C-a   (bol-ilisp)
2411 @kindex C-a
2412 will go after the prompt as defined by @code{comint-prompt-regexp} or
2413 @code{ilisp-other-prompt} or to the left margin with a prefix.
2414 @pindex bol-ilisp
2415 @cindex Going after the prompt
2416 @vindex comint-prompt-regexp
2417 @vindex ilisp-other-prompt
2418
2419 @item DEL   (backward-delete-char-untabify)
2420 @kindex DEL
2421 converts tabs to spaces as it moves back.
2422 @pindex backward-delete-char-untabify
2423 @cindex Converting tabs to spaces
2424
2425 @item @key{C-z} ;   (comment-region-lisp)
2426 @kindex @key{C-z} ;
2427 will put prefix copies of @code{comment-start} before and
2428 @code{comment-end}'s after the lines in region.  To uncomment a region,
2429 use a minus prefix.@refill
2430 @pindex comment-region-lisp
2431 @cindex Comment region
2432 @cindex Uncomment region
2433
2434 @item @key{C-z} )   (find-unbalanced-lisp)
2435 @kindex @key{C-z} )
2436 will find unbalanced parens in the current buffer.  When called with a
2437 prefix it will look in the current region.
2438 @pindex find-unbalanced-lisp
2439 @cindex Find unbalanced parens
2440 @cindex Parenthesis balancing
2441
2442 @end table
2443
2444
2445 @node Customization, Dialects, ILISP Commands, Top
2446 @chapter ILISP Customization
2447
2448 @c = = =   = = =   = = =   = = =   = = =   = = =   = = =   = = =
2449 @c this refers to hierarchiy, which isn't shown here.
2450 @cindex Customization
2451 @cindex Hooks
2452 @cindex Dialect startup
2453
2454
2455 Starting a dialect runs the hooks on @code{comint-mode-hook}
2456 and @code{ilisp-mode-hook} and then @var{DIALECT}@code{-hooks} specific
2457 to dialects in the nesting order below.
2458 @vindex ilisp-mode-hook
2459 @vindex comint-mode-hook
2460 @example
2461  common-lisp
2462    allegro
2463    clisp-hs
2464    cmulisp
2465    cormanlisp
2466    kcl
2467      akcl
2468        gcl
2469        ecl
2470      ibcl
2471    lispworks
2472    lucid
2473      liquid
2474    openmcl
2475    sbcl
2476  scheme
2477    chez
2478    guile
2479    mzscheme
2480      drscheme-jr
2481    oaklisp
2482    Scheme->C (still "in fieri")
2483    scm
2484    snow
2485    stk
2486  xlisp
2487    xlispstat
2488 @end example
2489
2490 On the very first prompt in the inferior Lisp,
2491 the hooks on @code{ilisp-init-hook} are run.  For more information on
2492 creating a new dialect or variables to set in hooks, see @file{ilisp.el}.
2493 @cindex First prompt
2494 @vindex ilisp-init-hook
2495
2496
2497
2498 @c ->  ->  ->  ->  ->  ->  ->  ->  ->  ->  ->  plenty of indexing here
2499 @c         put these in a table for later expandment
2500 @c 
2501
2502 ILISP Mode Hooks:
2503 @cindex ILISP Mode Hooks
2504 @table @code
2505 @item ilisp-site-hook
2506 @vindex ilisp-site-hook
2507 Executed when file is loaded
2508 @item ilisp-load-hook
2509 @vindex ilisp-load-hook
2510 Executed when file is loaded
2511 @item ilisp-mode-hook
2512 @vindex ilisp-mode-hook
2513 Executed when an ilisp buffer is created
2514 @item ilisp-init-hook
2515 @vindex ilisp-init-hook
2516 Executed after inferior Lisp is initialized and the first prompt is
2517 seen.
2518 @item @var{DIALECT}-hook
2519 @vindex @var{DIALECT}-hook
2520 Executed when dialect is set
2521 @end table
2522
2523 Variables you might want to set in a hook or dialect:
2524 @table @code
2525 @item ilisp-*prefix*
2526 @vindex ilisp-*prefix*
2527 Keys to prefix ilisp key bindings
2528 @item ilisp-program
2529 @vindex ilisp-program
2530 Program to start for inferior Lisp
2531 @item ilisp-motd
2532 @vindex ilisp-motd
2533 String printed on startup with version
2534 @item lisp-wait-p
2535 @vindex lisp-wait-p
2536 Set to @code{t} for synchronous sends
2537 @item ilisp-handle-errors
2538 @vindex ilisp-handle-errors
2539 Set to @code{t} for ilisp to handle errors from the underlying Lisp.
2540 @item ilisp-display-output-function
2541 @vindex ilisp-display-output-function
2542 The name of a function which displays ILISP output.
2543 @item lisp-no-popper
2544 @vindex lisp-no-popper
2545 Set to @code{t} to have all output in inferior Lisp
2546 @item ilisp-*use-frame-for-output*
2547 @vindex ilisp-*use-frame-for-output*
2548 Set to @code{t} (default) to have multiline output in a distinct emacs-frame.
2549 @item ilisp-*use-frame-for-arglist-output-p*
2550 @vindex ilisp-*use-frame-for-arglist-output-p*
2551 Set to @code{t} (default) to have multiline arglist-output in a seperate
2552 emacs-frame.
2553 @item ilisp-bindings-*bind-space-p*
2554 @vindex ilisp-bindings-*bind-space-p*
2555 Set to @code{t} to have the SPC-key bound to #'ilisp-arglist-message-lisp-space.
2556 @item ilisp-*arglist-message-lisp-space-p*
2557 @vindex ilisp-*arglist-message-lisp-space-p*
2558 Set to @code{t} to display the arglist of the current function displayed,
2559 after you hit SPC.
2560 @item ilisp-*enable-imenu-p*
2561 @vindex ilisp-*enable-imenu-p*
2562 Set to @code{t} to enable ilisp-imenu, that provides an index of all
2563 lisp-functions/definitions in a file.
2564 @item lisp-show-status
2565 @vindex lisp-show-status
2566 Set to @code{nil} to stop showing process status
2567 @item ilisp-*prefix-match*
2568 @vindex ilisp-*prefix-match*
2569 Set to @code{t} if you do not want partial completion
2570 @item ilisp-filter-regexp
2571 @vindex ilisp-filter-regexp
2572 Input history filter 
2573 @item ilisp-filter-length
2574 @vindex ilisp-filter-length
2575 Input history minimum length
2576 @item ilisp-other-prompt
2577 @vindex ilisp-other-prompt
2578 Prompt for non- top-level read-eval print loops
2579 @end table
2580
2581 @node Dialects, Concept index, Customization, Top
2582 @chapter Dialects
2583 @cindex Dialects
2584
2585 A @dfn{dialect} of Lisp is a specific implementation.  For the parts of
2586 Common Lisp which are well specified, they are usually the same.  For
2587 the parts that are not (debugger, top-level loop, etc.), there is
2588 usually the same functionality but different commands.
2589
2590 ILISP provides the means to specify these differences so that the ILISP
2591 commands will use the specific command peculiar to an implementation,
2592 but still offer the same behavior with the same interface.
2593
2594
2595 @menu
2596 * Defining new dialects::       
2597 * Writing new commands::        
2598 @end menu
2599
2600 @node Defining new dialects, Writing new commands,  , Dialects
2601 @section Defining new dialects
2602
2603
2604 To define a new dialect use the macro @code{defdialect}.  For examples,
2605 look at the dialect definitions in @file{ilisp-acl.el},
2606 @file{ilisp-cmu.el}, @file{ilisp-kcl.el}, @file{ilisp-luc.el}.  There are
2607 hooks and variables for almost anything that you are likely to need to
2608 change.  The relationship between dialects is hierarchical with the root
2609 values being defined in @code{setup-ilisp}.  For a new dialect, you only
2610 need to change the variables that are different than in the parent
2611 dialect.
2612 @cindex Defining new dialects
2613 @pindex setup-ilisp
2614 @pindex defdialect
2615
2616
2617 @node Writing new commands,  , Defining new dialects, Dialects
2618 @section Writing new commands
2619 @cindex Internal ILISP functions
2620
2621 Basic tools for creating new commands:
2622 @table @code
2623 @item deflocal
2624 @findex deflocal
2625 Define a new buffer local variable.
2626 @item ilisp-dialect
2627 @findex ilisp-dialect
2628 List of dialect types.  For specific dialect clauses.
2629 @item lisp-symbol
2630 @findex lisp-symbol
2631 Create a symbol.
2632 @item lisp-symbol-name
2633 @findex lisp-symbol-name
2634 Return a symbol's name
2635 @item lisp-symbol-delimiter
2636 @findex lisp-symbol-delimiter
2637 Return a symbol's qualification
2638 @item lisp-symbol-package
2639 @findex lisp-symbol-package
2640 Return a symbol's package
2641 @item lisp-string-to-symbol
2642 @findex lisp-string-to-symbol
2643 Convert string to symbol
2644 @item lisp-symbol-to-string
2645 @findex lisp-symbol-to-string
2646 Convert symbol to string
2647 @item lisp-buffer-symbol
2648 @findex lisp-buffer-symbol
2649 Convert symbol to string qualified for buffer
2650 @item lisp-previous-symbol
2651 @findex lisp-previous-symbol
2652 Return previous symbol 
2653 @item lisp-previous-sexp
2654 @findex lisp-previous-sexp
2655 Return previous sexp
2656 @item lisp-def-name
2657 @findex lisp-def-name
2658 Return name of current definition
2659 @item lisp-function-name
2660 @findex lisp-function-name
2661 Return previous function symbol
2662 @item ilisp-read
2663 @findex ilisp-read
2664 Read an sexp with completion, arglist, etc
2665 @item ilisp-read-symbol
2666 @findex ilisp-read-symbol
2667 Read a symbol or list with completion
2668 @item ilisp-completing-read
2669 @findex ilisp-completing-read
2670 Read from choices or list with completion
2671 @end table
2672
2673 @noindent
2674 Notes:
2675 @itemize @bullet
2676 @item
2677 Special commands like arglist should use @code{ilisp-send} to send a
2678 message to the inferior Lisp.
2679 @findex ilisp-send
2680
2681 @item
2682 Eval/compile commands should use @code{eval-region-lisp} or
2683 @code{compile-region-lisp}.
2684 @findex compile-region-lisp
2685 @findex eval-region-lisp
2686
2687 @end itemize
2688
2689 @node Concept index, Key index, Dialects, Top
2690 @unnumbered Concept Index
2691 @printindex cp
2692
2693 @node Key index, Command index, Concept index, Top
2694 @unnumbered Key Index
2695 @printindex ky
2696
2697 @node Command index, Variable index, Key index, Top
2698 @unnumbered Command Index
2699
2700 @noindent
2701 Commands available via @kbd{M-x} prefix.
2702
2703 @printindex pg
2704
2705 @node Variable index, Function index, Command index, Top
2706 @unnumbered Variable Index
2707
2708 @noindent
2709 Variables and hooks of ILISP.
2710
2711 @printindex vr
2712
2713 @node Function index,  , Variable index, Top
2714 @unnumbered Function Index
2715
2716 @noindent
2717 Internal functions of ILISP which can be used to write new commands.
2718
2719 @printindex fn
2720
2721 @contents
2722
2723 @bye
2724
2725
2726 @comment Local variables:
2727 @comment version-control: t
2728 @comment End: