1 \input texinfo @c -*-texinfo-*- Last modified: February 20, 2002
2 @setfilename ilisp.info
3 @settitle The ILISP Inferior Lisp Interface
5 @dircategory Lisp Programming
7 * ILisp: (ilisp). Inferior Lisp mode.
14 @c NOTE: KEYBINDING DESCRIPTIONS IN THIS FILE
16 @c Texinfo doesn't support the functionality of substitute-command-keys,
17 @c which kind of makes things tough when the bindings change.
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.
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.
29 @c Todd Kaufmann 17-Mar-91
33 @c ================================================================
34 @c THIS file has the new style title page commands.
36 @c Run using special version of `texinfo.tex'.
37 @c Version 2.13 or higher is recommended.
39 @c Also, run `makeinfo' rather than `texinfo-format-buffer'.
40 @c (Get the texinfo2 package.)
41 @c ================================================================
43 @c Use this if you want small book size like the GNU Emacs bound book.
56 @c @pindex command (normally program)
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
74 @c - Add doc for rlogin lisps.
78 This file documents ILISP.
80 This is edition 0.23 of the ILISP manual
81 for ILISP Version: 5.12
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
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.
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.
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
107 @setchapternewpage odd
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
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
119 @comment ctrl-C version: @subtitle This is the ``@key{C-z}'' version of the manual.
121 @author by Todd Kaufmann, Chris McConnell, Ivan Vazquez,
122 @author Marco Antoniotti, Rick Campbell
123 @author and Paolo Amoroso
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
135 This is edition 0.23 of the @cite{ILISP User Manual}
136 for ILISP Version: 5.12,
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.
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.
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
158 @node Top, Distribution, (dir), (dir)
159 @comment node-name, next, previous, up
163 This Info file documents ILISP, a GNU Emacs interface for a Lisp
165 @comment ctrl-C version: @sp
166 @comment ctrl-C version: This is the ``@key{C-z}'' version of the manual.
170 * Distribution:: How to get the latest ILISP distribution.
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.
177 * Keybindings:: A word about the keys used by ILISP.
178 * Buffers of ILISP:: Buffers used by ILISP, and their 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.
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
191 * Function index:: Internal Emacs Lisp functions.
194 @node Distribution, Acknowledgements, Top, Top
195 @unnumbered How to get the latest ILISP distribution.
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.
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
209 General information on ILISP is available at:
211 http://ilisp.cons.org/
214 The project site, which provides access to the CVS source tree, bug
215 database, mailing lists and other resources, is hosted at SourceForge:
217 http://sourceforge.net/projects/ilisp/
220 The following mailing lists are available:
224 Subscribe to this list if you want to receive public announcements
226 @cindex @code{ilisp-announce} mailing list
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
234 This is the list for asking usage questions regarding ILISP.
235 @cindex @code{ilisp-help} mailing list
238 Subscribe to this list @emph{only} if you want to monitor the CVS
240 @cindex @code{ilisp-cvs} mailing list
243 You can subscribe to the lists and access the archives via the general
247 @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-announce}
250 @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-devel}
253 @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-help}
256 @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-cvs}
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}
271 * FTP and Web directions:: FTP and Web directions
274 @node FTP and Web directions, , , Distribution
275 @unnumberedsec FTP and Web directions
277 @cindex Anonymous FTP
278 @cindex Downloading ILISP
281 @cindex Getting ILISP
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
289 @code{http://sourceforge.net/project/showfiles.php?group_id=3957}
292 @code{http://www2.cons.org:8000/ftp-area/ilisp/}
295 @code{ftp://ftp2.cons.org/pub/languages/lisp/ilisp/}
299 If you use a tty ftp client, just log in as 'anonymous'.
301 Please report any problems to the @file{ilisp-help} mailing list.
303 @cindex @code{ilisp-help} mailing list
308 @code{% @dfn{gzip -dc ilisp-x.y.z.tar.gz | tar xf -}}
313 @code{% @dfn{unzip ilisp-x.y.z.zip}}
318 @node Acknowledgements, Introduction, Distribution, Top
319 @unnumbered Acknowledgements
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.
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
349 Paul Fuqua (for the CMU-CL GC display code),
371 Jeffrey Mark Siskind,
384 and many others for bug reports, suggestions and
385 code. Our apologies to anyone we may have forgotten.
387 Special thanks to Todd Kaufmann for the texinfo file, work on bridge,
388 epoch-pop and for really exercising everything.
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
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
403 @node Introduction, Installation, Acknowledgements, Top
404 @unnumbered Introduction
407 ILISP is an interface from GNU Emacs to an inferior Lisp. It has the
412 Runs under Emacs-18, Emacs-19, Emacs-20, and XEmacs-19.
415 Support for multiple Common Lisp (including Allegro, CLISP and CMU),
416 XLisp and Scheme dialects on multiple machines even at the same time.
419 Dynamically sized pop-up windows that can be buried and scrolled from
423 Packages are properly handled including the distinction between
424 exported and internal symbols.
427 Synchronous, asynchronous or batch eval and compile of files, regions,
428 definitions and sexps with optional switching and automatic calling.
431 Arglist, documentation, describe, inspect and macroexpand.
434 Completion of filename components and Lisp symbols including partial matches.
437 Find source both with and without help from the inferior Lisp,
438 including CLOS methods, multiple definitions and multiple files.
442 Edit the callers of a function with and without help from the
446 Trace/untrace a function.
449 @kbd{M-q} (``Fill-paragraph'') works properly on paragraphs in comments,
453 Find unbalanced parentheses.
459 Handles editing, entering and indenting full Lisp expressions.
462 Next, previous, and similar history mechanism compatible with comint.
468 Uniform interface to Lisp debuggers.
471 Result histories are maintained in the inferior Lisp.
474 Does not create spurious symbols and handles case issues.
477 Online manuals for ILISP and Common Lisp.
481 @node Installation, Starting up, Introduction, Top
482 @chapter How to install ILISP
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.
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.
496 * Configuration and compilation::
500 @node Configuration and compilation, Files of ILISP, , Installation
501 @comment node-name, next, previous, up
502 @section Configuration and compilation
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).
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
516 @cindex Compiling ILISP files
517 @cindex Byte-compiling ILISP files
518 @cindex @file{Makefile}
519 @findex ilisp-compile-inits
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
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}
545 See the file @file{INSTALLATION} for additional configuration options
546 and known problems for specific Lisp dialects.
547 @cindex @file{INSTALLATION}
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).
557 @cindex Windows, compiling under
558 @cindex @file{icompile.bat}
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
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}
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
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}.
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
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
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
612 @vindex ilisp-site-hook
617 (setq ilisp-site-hook
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")))
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:
629 http://www.xanalys.com/software_tools/reference/HyperSpec/
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.
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
644 @cindex Common Lisp HyperSpec
646 @cindex Common Lisp Manual
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}
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.
666 @cindex Common Lisp Manual
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
672 @cindex @file{ilisp.emacs}
673 @cindex @code{browse-url}
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.
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
692 @vindex ilisp-*use-fi-clman-interface-p*
693 @cindex @file{ilisp-def.el}
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
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.
712 @cindex @file{Makefile}
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
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:
735 Process to process communication.
736 @cindex @file{bridge.el}
739 Extensions for sending commands and getting results.
740 @cindex @file{comint-ipc.el}
743 The basic comint abstraction. You only need this if running Emacs-18.
744 @cindex @file{comint.el}
747 Partial completion code.
748 @cindex @file{completer.el}
750 @item custom-ilisp.el
752 @cindex @file{custom-ilisp.el}
755 Directory containing the documentation.
759 Directory containing contributed packages.
763 Windows batch file for compiling ILISP (useful if you don't have GNU
765 @cindex @file{icompile.bat}
768 Compatibility code between FSF-18, FSF-19, FSF-20, LEmacs-19 and XEmacs.
769 @cindex @file{ilcompat.el}
772 Uniform interface to Lisp debuggers.
773 @cindex @file{ild.el}
776 Support for GNU Emacs v18.
777 @cindex @file{ilfsf18.el}
780 Support for GNU Emacs v19.
781 @cindex @file{ilfsf19.el}
784 Support for GNU Emacs v20.
785 @cindex @file{ilfsf20.el}
788 Allegro Common Lisp dialect definition.
789 @cindex @file{ilisp-acl}
792 Autoload definitions.
793 @cindex @file{ilisp-aut.el}
796 ILISP batch code module.
797 @cindex @file{ilisp-bat.el}
800 ILISP bug submittal code.
801 @cindex @file{ilisp-bug.el}
804 Corman Common Lisp dialect definition.
805 @cindex @file{ilisp-ccl.el}
808 Haible and Stoll's CLISP Common Lisp dialect definition.
809 @cindex @file{ilisp-chs.el}
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}
816 Common Lisp dialect definition.
817 @cindex @file{ilisp-cl.el}
820 ILISP completer related code.
821 @cindex @file{ilisp-cmp.el}
824 Comint related code/setup.
825 @cindex @file{ilisp-cmt.el}
828 CMU CL Common Lisp dialect definition.
829 @cindex @file{ilisp-cmu.el}
832 Variable definitions.
833 @cindex @file{ilisp-def.el}
836 Code for customizing dialects
837 @cindex @file{ilisp-dia.el}
840 ILISP mode documenation.
841 @cindex @file{ilisp-doc.el}
844 Standalone lisp-mode extensions.
845 @cindex @file{ilisp-ext.el}
848 High level interface code.
849 @cindex @file{ilisp-hi.el}
852 Xanalys/Harlequin LispWorks Common Lisp dialect definition.
853 @cindex @file{ilisp-hlw.el}
857 @cindex @file{ilisp-hnd.el}
860 ILISP specific code for imenu.
861 @cindex @file{ilisp-imenu.el}
865 @cindex @file{ilisp-ind.el}
869 @cindex @file{ilisp-inp.el}
872 Kyoto Common Lisp dialect definition.
873 @cindex @file{ilisp-kcl.el}
876 Keymap setups, including @code{ilisp-lispm-bindings}.
877 @cindex @file{ilisp-key.el}
880 Interface to reset/kill/abort inferior Lisp.
881 @cindex @file{ilisp-kil.el}
884 Low level interface code.
885 @cindex @file{ilisp-low.el}
888 Lucid/Liquid Common Lisp dialect definition.
889 @cindex @file{ilisp-luc.el}
892 Code for supporting the ILISP build process.
893 @cindex @file{ilisp-mak.el}
897 @cindex @file{ilisp-menu.el}
900 Menubar definition code.
901 @cindex @file{ilisp-mnb.el}
904 ILISP mode definition.
905 @cindex @file{ilisp-mod.el}
908 Buffer-point movement code.
909 @cindex @file{ilisp-mov.el}
911 @item ilisp-openmcl.el
912 OpenMCL dialect definition.
913 @cindex @file{ilisp-openmcl.el}
916 Output handling, include typeout window (a popper replacement).
917 @cindex @file{ilisp-out.el}
920 Process handling code.
921 @cindex @file{ilisp-prc.el}
924 Parenthesis handling.
925 @cindex @file{ilisp-prn.el}
929 @cindex @file{ilisp-rng.el}
932 Scheme->C Scheme dialect definition.
933 @cindex @file{ilisp-s2c.el}
936 Steel Bank Common Lisp dialect definition.
937 @cindex @file{ilisp-sbcl.el}
940 Scheme dialects definitions.
941 @cindex @file{ilisp-sch.el}
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}
948 ilisp-send definitions and associated code.
949 @cindex @file{ilisp-snd.el}
952 ILISP source code module.
953 @cindex @file{ilisp-src.el}
956 ILISP symbol handling.
957 @cindex @file{ilisp-sym.el}
961 @cindex @file{ilisp-utl.el}
964 Buffer value interface.
965 @cindex @file{ilisp-val.el}
968 Transfer between Lisp <-> Emacs code.
969 @cindex @file{ilisp-xfr.el }
972 XLisp and XLisp-Stat dialects definitions.
973 @cindex @file{ilisp-xls.el}
976 File to be loaded, loads in all necessary parts of ILISP.
977 @cindex @file{ilisp.el}
980 File with sample @file{.emacs} code for ILISP.
981 @cindex @file{ilisp.emacs}
984 Texinfo file for ILISP.
985 @cindex @file{ilisp.texi}
988 Support for Lucid Emacs v19.
989 @cindex @file{illuc19.el}
993 @cindex @file{ilxemacs.el}
996 Support code for Common Lisp. Each dialect will have one of these
998 @cindex @file{.lisp} files
1001 Support code for Scheme. Each dialect will have one of these files.
1002 @cindex @file{.scm} files
1006 @cindex @file{.el} files
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
1022 @cindex Lucid Common Lisp
1024 @cindex CMU Common Lisp
1028 @cindex Kyoto Common Lisp
1030 @cindex Austin Kyoto Common Lisp
1032 @cindex GNU Common Lisp
1036 @cindex Ibuki Common Lisp
1042 @cindex SB Common Lisp
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
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.
1080 These are the currently supported dialects.
1083 @item @code{allegro}
1084 Allegro Common Lisp from Franz Inc.
1087 Austin Kyoto Common Lisp, the U. Texas derivative.
1090 Chez Scheme by Cadence Research Systems.
1092 @item @code{clisp-hs}
1093 CLISP by Haible and Stoll.
1096 CMU Common Lisp, the major development platform for ILISP so far.
1098 @item @code{cormanlisp}
1099 Corman Common Lisp by Roger Corman.
1101 @item @code{drscheme-jr}
1102 DrScheme-jr by Rice University's PLT.
1104 @item @code{common-lisp}
1105 Generic Common Lisp.
1108 EcoLisp, the Embeddable Common Lisp by Beppe Attardi. A derivative of
1112 GNU Common Lisp, the official GNU release. A derivative of AKCL.
1115 GUILE Scheme by the GNU Project.
1118 Ibuki Common Lisp, derived from KCL.
1121 Kyoto Common Lisp, original version.
1124 Liquid Common Lisp, the successor of Lucid Common Lisp supported by
1125 Xanalys/Harlequin Ltd.
1127 @item @code{lispworks}
1128 LispWorks Common Lisp from Xanalys/Harlequin Ltd.
1131 Lucid Common Lisp, currently supported by Xanalys/Harlequin Ltd.
1133 @item @code{mzscheme}
1134 MzScheme by Rice University's PLT.
1136 @item @code{oaklisp}
1139 @item @code{openmcl}
1143 Steel Bank Common Lisp
1149 SCM Scheme by Aubrey Jeffer.
1152 Snow, STk Scheme without supoort for the Tk toolkit.
1155 STk scheme by Erick Gallesio.
1158 XLisp by David Betz.
1160 @item @code{xlispstat}
1161 XLisp-Stat, a derivative of XLisp for statistical computations.
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
1171 @cindex @file{ilisp-s2c.el}
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}.
1177 The currently supported dialects are listed below so that the
1178 indentation correponds to the hierarchical relationship between
1202 Scheme->C (still "in fieri")
1211 @c ==================================================================
1212 @node Keybindings, Buffers of ILISP, Starting up, Top
1213 @chapter A word about the keys used by ILISP
1215 @cindex FSF keyspace
1216 @vindex ilisp-*use-fsf-compliant-keybindings*
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.
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:
1232 (setq ilisp-*use-fsf-compliant-keybindings* t)
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.
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:
1248 Everywhere you see @key{C-z} given as a prefix key, substitute @key{C-c}.
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.
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}.
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.
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
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
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
1296 @item @code{*Completions*}
1297 @cindex @code{*Completions*} buffer
1298 Used for listing completions of symbols or files by the completion commands.
1301 @item *Aborted Commands*
1302 @cindex @code{*Aborted Commands*} buffer
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.
1314 @cindex @code{*ilisp-send*} buffer
1315 Buffer containing the last form sent to the inferior Lisp.
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}.
1323 @item *Last-Changes*
1324 @itemx *Changed-Definitions*
1325 @cindex @code{*Last-Changes*} buffer
1326 @cindex @code{*Changed-Definitions*} buffer
1327 @xref{Batch commands}.
1331 * Typeout windows:: temporary windows used for display.
1332 * Switching buffers:: Switching buffers
1335 @node Typeout windows, Switching buffers, , Buffers of ILISP
1336 @section Typeout windows
1337 @cindex Typeout windows
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
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}.
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}.
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}.
1363 The default display function is @code{ilisp-display-output-default},
1364 which obeys the @code{lisp-no-popper} variable.
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.
1373 @item @key{C-z} 1 (ilisp-bury-output)
1374 deletes and buries the typeout output window.
1376 @pindex ilisp-bury-output
1377 @cindex bury output window
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
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
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
1404 @cindex Turning off typeout windows
1405 @vindex comint-always-scroll
1406 @vindex lisp-no-popper
1410 @node Switching buffers, ,Typeout windows, Buffers of ILISP
1411 @section Switching buffers
1413 Commands to make switching between buffers easier.
1414 @cindex Switching buffers
1417 @item @key{C-z} b (switch-to-lisp)
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
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
1437 @node ILISP Commands, Customization, Buffers of ILISP, Top
1438 @chapter ILISP Commands
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.
1446 * Eval and compile functions::
1447 * Documentation functions::
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
1459 * Miscellany:: Indentation, parenthesis balancing,
1460 and comment commands.
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
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.
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.
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
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
1497 @vindex lisp-show-status
1498 @cindex Status light
1499 @cindex Modeline status
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
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
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
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
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
1536 The prefix-key for most ILISP commands. This can be changed by setting
1537 the variable @code{ilisp-*prefix*}.
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
1548 @item C-] (close-and-send-lisp)
1549 Closes the current sexp, indents it, and then sends it to the current
1551 @pindex close-and-send-lisp
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
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)
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
1571 @item @key{C-z} r (eval-region-lisp)
1572 @itemx @key{C-z} C-r (eval-region-and-go-lisp)
1574 @pindex eval-region-lisp
1575 @kindex @key{C-z} C-r
1576 @pindex eval-region-and-go-lisp
1579 @item @key{C-z} n (eval-next-sexp-lisp)
1580 @itemx @key{C-z} C-n (eval-next-sexp-and-go-lisp)
1582 @pindex eval-next-sexp-lisp
1583 @kindex @key{C-z} C-n
1584 @pindex eval-next-sexp-and-go-lisp
1586 @item @key{C-z} c (compile-defun-lisp)
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
1596 @item @key{C-z} w (compile-region-lisp)
1597 @itemx @key{C-z} C-w (compile-region-and-go-lisp)
1599 @pindex compile-region-lisp
1600 @kindex @key{C-z} C-w
1601 @pindex compile-region-and-go-lisp
1602 @cindex Compile region
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
1622 @pindex abort-commands-lisp
1626 @node Documentation functions, Macroexpansion, Eval and compile functions, ILISP Commands
1627 @section Documentation functions
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}
1636 @cindex Describing Lisp objects
1639 @cindex Negative prefix
1640 @cindex Minibuffer completion
1641 @pindex describe-lisp
1642 @cindex Documentation Functions
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.
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}.
1652 @cindex Franz manual
1656 @item @key{C-z} a (arglist-lisp)
1657 @cindex Arglist Lisp
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
1664 @item @key{SPC} (ilisp-arglist-message-lisp-space)
1665 @cindex Arglist Lisp
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}.}
1673 @item @key{C-z} d (documentation-lisp)
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.
1681 @item @key{C-z} i (describe-lisp)
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
1687 @item @key{C-z} I (inspect-lisp)
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.
1694 @item @key{C-z} H (hyperspec-lookup)
1696 @pindex hyperspec-lookup
1697 Look up a standard symbol in the Common Lisp HyperSpec and display the
1700 @cindex Common Lisp HyperSpec
1702 @item @key{C-z} L or @key{C-z} M-l (cltl2-lookup)
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
1710 @item @key{C-z} D (fi:clman)
1711 @itemx @key{C-z} A (fi:clman-apropos)
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
1727 @node Macroexpansion, Tracing functions, Documentation functions, ILISP Commands
1728 @section Macroexpansion
1731 @item @key{C-z} M (macroexpand-lisp)
1732 @itemx @key{C-z} m (macroexpand-1-lisp)
1734 @pindex macroexpand-lisp
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
1746 @node Tracing functions, Package Commands, Macroexpansion, ILISP Commands
1747 @section Tracing functions
1750 @item @key{C-z} t (trace-defun-lisp)
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
1769 @node Package Commands, Source code commands, Tracing functions, ILISP Commands
1770 @section Package Commands
1771 @cindex Package commands
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
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
1796 @item @key{C-z} P (set-package-lisp)
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.
1802 @item @key{C-z} p (set-buffer-package-lisp)
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.
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
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:
1822 try the inferior Lisp,
1824 try a tags file if defined,
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
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}.
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
1841 @cindex Source modes
1842 @vindex auto-mode-alist
1843 @kindex M-x lisp-directory
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}
1852 @pindex edit-callers-lisp
1853 @pindex who-calls-lisp
1854 @pindex edit-definitions-lisp
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
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
1888 @pindex next-caller-lisp
1890 @pindex edit-callers-lisp
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
1900 @pindex next-definition-lisp
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
1909 @pindex replace-lisp
1912 Here is a summary of the above commands (behavior when given prefix
1913 argument is given in parentheses):
1916 @item M-x lisp-directory
1917 Define a set of files to be used by the source code commands.
1919 @item M-. (edit-definitions-lisp)
1920 Find definition of a symbol.
1922 @item M-, (next-definition-lisp)
1923 Find next (previous) definition.
1925 @item @key{C-z} ^ (edit-callers-lisp)
1926 Find all callers of a function, and edit the first.
1928 @item M-` (next-caller-lisp)
1929 Edit next (previous) caller of function set by @code{edit-callers-lisp}.
1931 @item M-x who-calls-lisp
1932 List all the callers of a function.
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.
1940 @item M-" (replace-lisp)
1941 Replace a string (regular expression) in files.
1946 @node Batch commands, Files and directories, Source code commands, ILISP Commands
1947 @section Batch commands
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
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
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
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)
2002 @node Files and directories, Keyboard modes, Batch commands, ILISP Commands
2003 @section Files and directories
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.
2016 @item C-x C-f (find-file-lisp)
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
2027 @item @key{C-z} l (load-file-lisp)
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
2040 @item @key{C-z} k (compile-file-lisp)
2042 will compile a file in the current inferior Lisp.
2043 @pindex compile-file-lisp
2044 @cindex Compiling files
2046 @item @key{C-z} ! (default-directory-lisp)
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
2058 @node Keyboard modes, Interrupts, Files and directories, ILISP Commands
2059 @section Switching between interactive and raw keyboard modes
2061 @cindex Raw keyboard mode
2062 @cindex Interactive keyboard mode
2063 @vindex ilisp-raw-echo
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.
2073 @pindex raw-keys-ilisp
2075 @pindex io-bridge-ilisp
2076 @kindex M-x io-bridge-ilisp
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:
2087 @code{(progn (format t "^[1^]") (print (read-char)) (format t "^[0^]"))}
2089 @node Interrupts, Debuggers, Keyboard modes, ILISP Commands
2090 @section Interrupts, aborts, and errors
2093 If you want to abort the last command you can use @kbd{C-g}.
2096 @cindex Aborting commands
2097 @cindex Interrupting commands
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
2108 @pindex interrupt-subjob-ilisp
2109 @cindex @code{*Aborted Commands*} buffer
2111 @pindex abort-commands-lisp
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
2120 @pindex delete-char-or-pop-ilisp
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
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.
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.
2159 @node Debuggers, Command history, Interrupts, ILISP Commands
2160 @section Interface to Lisp debuggers
2161 @cindex Debugger interface
2162 @cindex Interface to Lisp debuggers
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
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.
2178 Here is a list of the available ILD commands:
2181 @item M-a (ild-abort)
2185 @cindex Aborting from a debugger
2186 @item M-c (ild-continue)
2188 @pindex ild-continue
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).
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
2203 @cindex Previous stack frame
2204 @cindex Stack frames
2205 @item C-c < (ild-top)
2209 @cindex Top stack frame
2210 @cindex Stack frames
2211 @item C-c > (ild-bottom)
2215 @cindex Bottom stack frame
2216 @cindex Stack frames
2217 @item M-b (ild-backtrace)
2219 @pindex ild-backtrace
2221 @cindex Stack backtrace
2223 @item M-C-d (ild-locals)
2224 Display all local variables.
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).
2234 @cindex Displaying local variables
2235 @cindex Local variables
2236 @item M-C-s (ild-step)
2237 Step to the next breakpoint.
2240 @cindex Stepping to next breakpoint
2241 @item C-c r (ild-return)
2245 @cindex Returning from a debugger
2246 @item M-C-r (ild-retry)
2250 @cindex Retrying from a debugger
2251 @item C-x t (ild-trap-on-exit)
2253 @pindex ild-trap-on-exit
2255 @cindex Trapping on exit from a debugger
2256 @item C-c L (select-lisp)
2257 Select Lisp interaction buffer.
2260 @cindex Selecting a Lisp interaction buffer
2261 @item @key{C-z} C-s (slow-lisp)
2262 Set compiler options for maximal debuggability.
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.
2270 @kindex @key{C-z} C-f
2271 @cindex Setting compiler options
2272 @cindex Compiler options
2277 @node Command history, Completion, Debuggers, ILISP Commands
2278 @section Command history
2279 @cindex Command history
2280 @cindex Last command
2281 @cindex Previous commands
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}
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
2297 @item M-n (comint-next-input)
2298 @itemx M-p (comint-previous-input)
2300 @pindex comint-next-input
2303 @pindex comint-previous-input
2304 Cycle through the input history.
2306 @item M-s (comint-previous-similar-input)
2308 @pindex comint-previous-similar-input
2309 @cindex Similar input
2310 Cycle through input that has the string typed so far as a prefix.
2312 @item M-N (comint-psearch-input)
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)
2320 @pindex comint-msearch-input
2321 Search backwards for prompt.
2323 @item C-c R (comint-msearch-input-matching)
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).
2330 See @code{comint-mode} documentation for more information on
2331 @samp{comint} commands.
2334 @node Completion, Miscellany, Command history, ILISP Commands
2337 Commands to reduce number of keystrokes.
2339 @cindex Partial completion
2340 @cindex Filename completion
2343 @item M-TAB (complete-lisp)
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
2371 @item M-RET (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.
2382 @node Miscellany, , Completion, ILISP Commands
2385 Indentation, parenthesis balancing, movement and comment commands.
2389 @item @kbd{TAB} (indent-line-ilisp)
2391 indents for Lisp. With prefix, shifts rest of expression rigidly with
2393 @pindex indent-line-ilisp
2395 @cindex Rigid indentation
2398 @item M-C-q (indent-sexp-ilisp)
2400 will indent each line in the next sexp.
2401 @pindex indent-sexp-ilisp
2403 @item M-q (reindent-lisp)
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
2410 @item C-a (bol-ilisp)
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.
2415 @cindex Going after the prompt
2416 @vindex comint-prompt-regexp
2417 @vindex ilisp-other-prompt
2419 @item DEL (backward-delete-char-untabify)
2421 converts tabs to spaces as it moves back.
2422 @pindex backward-delete-char-untabify
2423 @cindex Converting tabs to spaces
2425 @item @key{C-z} ; (comment-region-lisp)
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
2434 @item @key{C-z} ) (find-unbalanced-lisp)
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
2445 @node Customization, Dialects, ILISP Commands, Top
2446 @chapter ILISP Customization
2448 @c = = = = = = = = = = = = = = = = = = = = = = = =
2449 @c this refers to hierarchiy, which isn't shown here.
2450 @cindex Customization
2452 @cindex Dialect startup
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
2482 Scheme->C (still "in fieri")
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
2498 @c -> -> -> -> -> -> -> -> -> -> -> plenty of indexing here
2499 @c put these in a table for later expandment
2503 @cindex ILISP Mode Hooks
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
2518 @item @var{DIALECT}-hook
2519 @vindex @var{DIALECT}-hook
2520 Executed when dialect is set
2523 Variables you might want to set in a hook or dialect:
2525 @item ilisp-*prefix*
2526 @vindex ilisp-*prefix*
2527 Keys to prefix ilisp key bindings
2529 @vindex ilisp-program
2530 Program to start for inferior Lisp
2533 String printed on startup with version
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
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,
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
2581 @node Dialects, Concept index, Customization, Top
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.
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.
2596 * Defining new dialects::
2597 * Writing new commands::
2600 @node Defining new dialects, Writing new commands, , Dialects
2601 @section Defining new dialects
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
2612 @cindex Defining new dialects
2617 @node Writing new commands, , Defining new dialects, Dialects
2618 @section Writing new commands
2619 @cindex Internal ILISP functions
2621 Basic tools for creating new commands:
2625 Define a new buffer local variable.
2627 @findex ilisp-dialect
2628 List of dialect types. For specific dialect clauses.
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
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
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
2677 Special commands like arglist should use @code{ilisp-send} to send a
2678 message to the inferior Lisp.
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
2689 @node Concept index, Key index, Dialects, Top
2690 @unnumbered Concept Index
2693 @node Key index, Command index, Concept index, Top
2694 @unnumbered Key Index
2697 @node Command index, Variable index, Key index, Top
2698 @unnumbered Command Index
2701 Commands available via @kbd{M-x} prefix.
2705 @node Variable index, Function index, Command index, Top
2706 @unnumbered Variable Index
2709 Variables and hooks of ILISP.
2713 @node Function index, , Variable index, Top
2714 @unnumbered Function Index
2717 Internal functions of ILISP which can be used to write new commands.
2726 @comment Local variables:
2727 @comment version-control: t