Mercurial > hg > xemacs-beta
comparison man/ilisp.texi @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | 4b173ad71786 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 \input texinfo @c -*-texinfo-*- Last modified: April 10, 1993 | |
2 @setfilename ../info/ilisp.info | |
3 @settitle The ILISP Inferior LISP Interface | |
4 | |
5 @c NOTE: KEYBINDING DESCRIPTIONS IN THIS FILE | |
6 @c | |
7 @c Texinfo doesn't support the functionality of substitute-command-keys, | |
8 @c which kind of makes things tough when the bindings change. | |
9 @c | |
10 @c Note that all the keys here which use the ILISP prefix have | |
11 @c @key{C-z} before them, so a global replace can be used to put in a | |
12 @c specific value for this (if wanted). The whole string should be | |
13 @c rpelaced, as in (replace-string "@key{C-z}" "@key{C-c}"). Any occurrances | |
14 @c of this should be in the proper @kbd{} construct, or in a table. | |
15 @c | |
16 @c Key command descriptions in tables have the function listed after | |
17 @c them, as in "@item RET (return-ilisp)" so it should be poosible | |
18 @c to update these descriptions with a little elisp code. | |
19 @c | |
20 @c Todd Kaufmann 17-Mar-91 | |
21 @c toad@cs.cmu.edu | |
22 | |
23 | |
24 @c ================================================================ | |
25 @c THIS file has the new style title page commands. | |
26 | |
27 @c Run using special version of `texinfo.tex'. | |
28 @c Version 2.13 or higher is recommended. | |
29 | |
30 @c Also, run `makeinfo' rather than `texinfo-format-buffer'. | |
31 @c (Get the texinfo2 package.) | |
32 @c ================================================================ | |
33 | |
34 @c Use this if you want small book size like the GNU Emacs bound book. | |
35 @c smallbook | |
36 | |
37 @c tex | |
38 @c \overfullrule=0pt | |
39 @c end tex | |
40 | |
41 @comment INDEX USAGE: | |
42 @c | |
43 @c @cindex concept | |
44 @c @findex function | |
45 @c @vindex variable | |
46 @c @kindex key | |
47 @c @pindex command (normally program) | |
48 @c | |
49 @c not used: | |
50 @c @tindex (data)type | |
51 | |
52 | |
53 @c | |
54 @c Combine indices. | |
55 @c @synindex cp fn | |
56 @c @syncodeindex vr fn | |
57 @c @syncodeindex ky fn | |
58 @c @syncodeindex pg fn | |
59 @c @syncodeindex tp fn | |
60 @c oops: texinfo-format-buffer ignores synindex | |
61 @c So, use makeinfo.c. Get texinfo2.tar.Z off of prep.ai.mit.edu | |
62 @c | |
63 | |
64 @c TODO: | |
65 @c - Add doc for rlogin lisps. | |
66 @c - Add doc for trace-defun-break | |
67 | |
68 | |
69 @ifinfo | |
70 This file documents ILISP. | |
71 | |
72 This is edition 0.11 of the ILISP manual | |
73 for ILISP Version 5.5. | |
74 | |
75 Copyright (C) 1991,1992,1993 Todd Kaufmann | |
76 | |
77 Permission is granted to make and distribute verbatim copies of | |
78 this manual provided the copyright notice and this permission notice | |
79 are preserved on all copies. | |
80 | |
81 Permission is granted to copy and distribute modified versions of this | |
82 manual under the conditions for verbatim copying, provided that the entire | |
83 resulting derived work is distributed under the terms of a permission | |
84 notice identical to this one. | |
85 | |
86 Permission is granted to copy and distribute translations of this manual | |
87 into another language, under the above conditions for modified versions, | |
88 except that this permission notice may be stated in a translation approved | |
89 by the Foundation. | |
90 @end ifinfo | |
91 @c | |
92 | |
93 @c | |
94 @setchapternewpage odd | |
95 | |
96 @titlepage | |
97 @title ILISP User Manual | |
98 @subtitle A GNU Emacs Interface for Interacting with Lisp | |
99 @subtitle Edition 0.11, June 1993 | |
100 @subtitle For ILISP Version 5.5 | |
101 @c | |
102 @c the following comment string is removed by the ctrl-c-doc.sh script, | |
103 @c which can be used to change all ilisp-prefix bindings to C-c (or | |
104 @c other). | |
105 @c | |
106 @comment ctrl-C version: @subtitle This is the ``@key{C-z}'' version of the manual. | |
107 | |
108 @author by Todd Kaufmann, Chris McConnell and Ivan Vazquez | |
109 | |
110 @page | |
111 @vskip 0pt plus 1filll | |
112 Copyright @copyright{} 1991, 1992, 1993 Todd Kaufmann | |
113 | |
114 @sp 2 | |
115 This is edition 0.11 of the @cite{ILISP User Manual} | |
116 for ILISP Version 5.5, | |
117 June 1993. | |
118 | |
119 @sp 2 | |
120 | |
121 Permission is granted to make and distribute verbatim copies of | |
122 this manual provided the copyright notice and this permission notice | |
123 are preserved on all copies. | |
124 | |
125 Permission is granted to copy and distribute modified versions of this | |
126 manual under the conditions for verbatim copying, provided that the entire | |
127 resulting derived work is distributed under the terms of a permission | |
128 notice identical to this one. | |
129 | |
130 Permission is granted to copy and distribute translations of this manual | |
131 into another language, under the above conditions for modified versions, | |
132 except that this permission notice may be stated in a translation approved | |
133 by this author. | |
134 @end titlepage | |
135 @page | |
136 | |
137 | |
138 @node Top, Distribution, (dir), (dir) | |
139 @comment node-name, next, previous, up | |
140 | |
141 | |
142 @ifinfo | |
143 This Info file documents ILISP, a GNU Emacs interface for a lisp | |
144 running in a buffer. | |
145 @comment ctrl-C version: @sp | |
146 @comment ctrl-C version: This is the ``@key{C-z}'' version of the manual. | |
147 @end ifinfo | |
148 | |
149 @menu | |
150 * Distribution:: How to get the latest ILISP distribution. | |
151 | |
152 * Acknowledgements:: Acknowledgements | |
153 * Introduction:: An introduction to ILISP and its features. | |
154 * Installation:: How to install ILISP. | |
155 * Starting up:: How to run a Lisp process using ILISP. | |
156 | |
157 * Buffers of ILISP:: Buffers used by ILISP, and their commands. | |
158 * ILISP Commands:: | |
159 * Customization:: Description of ILISP variables and hooks. | |
160 * Dialects:: How ILISP knows how to communicate with Lisp, | |
161 and how to define new dialects. | |
162 | |
163 Indices: | |
164 * Concept index:: General concepts. | |
165 * Key index:: ILISP key sequences. | |
166 * Command index:: Commands by name. | |
167 * Variable index:: Variables and hooks that influence ILISP's | |
168 behavior. | |
169 | |
170 * Function index:: Internal Emacs Lisp functions. | |
171 @end menu | |
172 | |
173 @node Distribution, Acknowledgements, Top, Top | |
174 @unnumbered How to get the latest ILISP distribution. | |
175 | |
176 ILISP is "free"; this means that everyone is free to use it and free | |
177 to redistribute it on a free basis. ILISP is not in the public domain; | |
178 it is copyrighted and there are restrictions on its distribution, but | |
179 these restrictions are designed to permit everything that a good | |
180 cooperating citizen would want to do. What is not allowed is to try to | |
181 prevent others from further sharing any version of ILISP that they might | |
182 get from you. The precise conditions appears following this section. | |
183 | |
184 The easiest way to get a copy of ILISP is from someone else who has it. | |
185 You need not ask for permission to do so, or tell any one else; just | |
186 copy it. | |
187 | |
188 If you do start using the package, please send mail to | |
189 @samp{ilisp-request@@lehman.com} so that I can keep a mailing list of | |
190 users. | |
191 | |
192 Please send bugs, questions or suggestions for discussion to @samp{ilisp@@lehman.com} | |
193 | |
194 @menu | |
195 * FTP directions:: FTP directions | |
196 @end menu | |
197 | |
198 @node FTP directions, , , Distribution | |
199 @unnumberedsec FTP directions | |
200 @cindex FTP site | |
201 @cindex Anonymous FTP | |
202 @cindex How to get | |
203 @cindex Getting ILISP | |
204 @noindent | |
205 You can anonymously ftp the source files from FTP.CS.CMU.EDU: | |
206 | |
207 @itemize @bullet | |
208 @item | |
209 Ftp to ftp.cs.cmu.edu (128.2.206.173) | |
210 @item | |
211 login as anonymous, with user@@host as password | |
212 @item | |
213 @code{cd /user/ai/lang/lisp/util/emacs/ilisp/57} | |
214 @item | |
215 @code{binary} | |
216 @item | |
217 @code{get ilisp.tgz} | |
218 @end itemize | |
219 | |
220 @noindent | |
221 Or get whatever single files you need. | |
222 | |
223 @noindent | |
224 Unpack and install: | |
225 | |
226 @code{uncompress ilisp.tar.Z; tar xf ilisp.tar} | |
227 | |
228 @xref{Installation}. | |
229 | |
230 If you want to use Thinking Machines' completion code, then Ftp it from | |
231 THINK.COM | |
232 | |
233 It no longer comes as part of the distribution. | |
234 | |
235 @node Acknowledgements, Introduction, Distribution, Top | |
236 @unnumbered Acknowledgements | |
237 | |
238 ILISP replaces the standard inferior LISP mode. ILISP is based on | |
239 comint mode and derived from a number of different interfaces including | |
240 Symbolics, cmulisp, and Thinking Machines. | |
241 | |
242 There are many people that have taken the time to report bugs, make | |
243 suggestions and even better send code to fix bugs or implement new | |
244 features. | |
245 | |
246 Thanks to Neil Smithline, David Braunegg, Fred White, Jim Healy, Larry | |
247 Stead, Hans Chalupsky, Michael Ernst, Frank Ritter, Tom Emerson, David | |
248 Duff, Dan Pierson, Michael Kashket, Jamie Zawinski, Bjorn Victor, Brian | |
249 Dennis, Guido Bosch, Chuck Irvine, Thomas M. Breuel, Ben Hyde, Paul | |
250 Fuqua (for the CMU-CL GC display code) and Marco Antoniotti for bug | |
251 reports, suggestions and code. My apologies to those whom I may have | |
252 forgotten. | |
253 | |
254 Special thanks to Todd Kaufmann for the texinfo file, work on bridge, | |
255 epoch-pop and for really exercising everything. | |
256 | |
257 Please send bug reports, fixes and extensions to | |
258 @samp{ilisp@@lehman.com} so I can merge them into the master | |
259 source. | |
260 @noindent | |
261 @example | |
262 --Chris McConnell 18-Mar-91 | |
263 --Ivan Vazquez 27-Jun-93 | |
264 @end example | |
265 | |
266 | |
267 @node Introduction, Installation, Acknowledgements, Top | |
268 @unnumbered Introduction | |
269 @cindex features | |
270 | |
271 ILISP is an interface from GNU Emacs to an inferior LISP. It has the | |
272 following features: | |
273 | |
274 @itemize @bullet | |
275 @item | |
276 Runs under emacs-18, fsf emacs-19, and Lucid emacs-19. | |
277 | |
278 @item | |
279 Support for multiple LISP dialects including Lucid, Allegro and CMU | |
280 on multiple machines even at the same time. | |
281 | |
282 @item | |
283 Dynamically sized pop-up windows that can be buried and scrolled from | |
284 any window. | |
285 | |
286 @item | |
287 Packages are properly handled including the distinction between | |
288 exported and internal symbols. | |
289 | |
290 @item | |
291 Synchronous, asynchronous or batch eval and compile of files, regions, | |
292 definitions and sexps with optional switching and automatic calling. | |
293 | |
294 @item | |
295 Arglist, documentation, describe, inspect and macroexpand. | |
296 | |
297 @item | |
298 Completion of filename components and LISP symbols including partial matches. | |
299 | |
300 @item | |
301 Find source both with and without help from the inferior LISP, | |
302 including CLOS methods, multiple definitions and multiple files. | |
303 | |
304 | |
305 @item | |
306 Edit the callers of a function with and without help from the | |
307 inferior LISP. | |
308 | |
309 @item | |
310 Trace/untrace a function. | |
311 | |
312 @item | |
313 @kbd{M-q} (``Fill-paragraph'') works properly on paragraphs in comments, | |
314 strings and code. | |
315 | |
316 @item | |
317 Find unbalanced parentheses. | |
318 | |
319 @item | |
320 Super brackets. | |
321 | |
322 @item | |
323 Handles editing, entering and indenting full LISP expressions. | |
324 | |
325 @item | |
326 Next, previous, and similar history mechanism compatible with comint. | |
327 | |
328 @item | |
329 Handles LISP errors. | |
330 | |
331 @item | |
332 Result histories are maintained in the inferior LISP. | |
333 | |
334 @item | |
335 Does not create spurious symbols and handles case issues. | |
336 | |
337 @item | |
338 Online manuals for ILISP and Common LISP. | |
339 | |
340 @end itemize | |
341 | |
342 @node Installation, Starting up, Introduction, Top | |
343 @chapter How to install ILISP | |
344 @cindex Installation | |
345 Installation of ILISP and some initialization of your computing | |
346 environment are described in this chapter. Please read the following | |
347 sections carefully before getting started with ILISP. | |
348 | |
349 If ILISP has already been installed at your location, you can probably | |
350 skip ahead to ``Autoloading.'' | |
351 | |
352 Note that jwz's byte-compiler is required when compiling ILISP. If you | |
353 don't have it, get it from | |
354 @code{archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/bytecomp2.tar.Z} | |
355 | |
356 You don't need it if you are running emacs version 19 as both the Fsf | |
357 and Lucid releases include this in their distributions. | |
358 | |
359 @menu | |
360 * Makefile configuration:: | |
361 * Files of ILISP:: | |
362 * Autoloading:: How to define autoload entries. | |
363 @end menu | |
364 | |
365 @node Makefile configuration, Files of ILISP, , Installation | |
366 @comment node-name, next, previous, up | |
367 @section Makefile configuration | |
368 | |
369 Some configuration needs to be done before compiling the emacs-lisp | |
370 files that comprise ILISP. This should be done in the | |
371 @code{Makefile-ilisp} file in the section of the file marked | |
372 CONFIGURATION SECTION. | |
373 | |
374 First, set the @code{YOUR_EMACS} variable to be the pathname of the | |
375 emacs you will be using ILISP with. This is the emacs that will be used | |
376 to compile ILISP with. | |
377 | |
378 If you don't have jwz's byte compiler in your standard load path then | |
379 you will have to uncomment the @code{BYTECOMP} line and set it to point | |
380 to the correct location of the bytecomp files. | |
381 | |
382 If you do not have comint already in your emacs ( both Fsf 19 and Lucid | |
383 19 do ) then uncomment the @code{USE_BUNDLED_COMINT} line. This will | |
384 cause the copy of @code{comint.el} to be moved from the @code{Extras} | |
385 directory into the main ILISP directory. | |
386 | |
387 The advice section is left uncommented out in the distributed | |
388 @code{Makefile-ilisp} because most people will not have | |
389 @code{advice.elc} in their load path. Only Lucid emacs 19.8 will have | |
390 this in the standard distribution. If you do have it in your load path, | |
391 then to avoid having two copies in your load-path and avoiding future | |
392 confusion then comment out both the @code{ADVICE} and | |
393 @code{USE_BUNDLED_ADVICE} lines. | |
394 | |
395 @cindex Compiling ILISP files | |
396 @cindex Byte-compiling ILISP files | |
397 @findex ilisp-compile-inits | |
398 @vindex ilisp-load-inits | |
399 @vindex ilisp-site-hook | |
400 @vindex ilisp-program | |
401 @vindex ilisp-init-binary-command | |
402 @vindex ilisp-init-binary-extension | |
403 | |
404 You can then compile everything with the shell command | |
405 | |
406 @code{make -f Makefile-ilisp <your target here>'} | |
407 | |
408 Where the possible targets are @code{emacs_18}, @code{emacs_18_epoch}, | |
409 @code{emacs_18_menu}, and @code{emacs_19}. | |
410 | |
411 Ignore any compilation warnings unless they result in ILISP not | |
412 compiling completely. | |
413 | |
414 You should then copy relevant sections of @code{ilisp.emacs} to your | |
415 @code{.emacs} or to the system-wide @code{default.el} file, depending on | |
416 who will be using ILISP. | |
417 | |
418 You should add the directory where all of the ILISP emacs-lisp files | |
419 reside to your @code{load-path}. There is an example of this in | |
420 @code{ilisp.emacs} | |
421 | |
422 The first time a dialect is started, the interface files will complain | |
423 about not being compiled, just hit @kbd{i} to ignore the message. Once | |
424 a lisp dialect is started up, you should execute the command | |
425 @code{ilisp-compile-inits} which will compile the @samp{*.lisp} files | |
426 and write them to the same directory as the ilisp files.@refill | |
427 | |
428 The binary files should have a unique | |
429 extension for each different combination of architecture and | |
430 LISP dialect. You will need to change | |
431 @code{ilisp-init-binary-extension} and | |
432 @code{ilisp-init-binary-command} to get additional | |
433 extensions. The binary for each different architecture | |
434 should be different. If you want to build the interface | |
435 files into a LISP world, you will also need to set | |
436 @code{ilisp-load-inits} to @code{nil} in the same place that | |
437 you change @code{ilisp-program} to load the LISP | |
438 world.@refill | |
439 | |
440 | |
441 There is an @code{ilisp-site-hook} for initializing site specific stuff | |
442 like program locations when ILISP is first loaded. You may want to | |
443 define appropriate autoloads in your system Emacs start up file. | |
444 | |
445 Example site init: | |
446 @example | |
447 ;;; CMU site | |
448 (setq ilisp-site-hook | |
449 '(lambda () | |
450 (setq ilisp-motd "CMU ILISP V%s") | |
451 (setq expand-symlinks-rfs-exists t) | |
452 (setq allegro-program "/usr/misc/.allegro/bin/cl") | |
453 (setq lucid-program "/usr/misc/.lucid/bin/lisp"))) | |
454 @end example | |
455 | |
456 | |
457 | |
458 @node Files of ILISP, Autoloading, Makefile configuration, Installation | |
459 @section Files of ILISP | |
460 @cindex Files of ILISP | |
461 The files you need to use ilisp are: | |
462 | |
463 @table @file | |
464 | |
465 @item ilisp.emacs | |
466 File with sample @file{.emacs} code for ILISP. | |
467 @cindex @file{ilisp.emacs} | |
468 | |
469 @item symlink-fix.el | |
470 Expand pathnames resolving links. | |
471 @cindex @file{symlink-fix.el} | |
472 | |
473 @item completer.el | |
474 Partial completion code. | |
475 @cindex @file{completer.el} | |
476 | |
477 @item bridge.el | |
478 Process to process communication. | |
479 @cindex @file{bridge.el} | |
480 | |
481 @item comint.el | |
482 The basic comint abstraction. You only need this if running emacs-18. | |
483 @cindex @file{comint.el} | |
484 | |
485 @item comint-ipc.el | |
486 Extensions for sending commands and getting results. | |
487 @cindex @file{comint-ipc.el} | |
488 | |
489 @item ilisp-ext.el | |
490 Standalone lisp-mode extensions. | |
491 @cindex @file{ilisp-ext.el} | |
492 | |
493 @item ilisp-bug.el | |
494 ILISP bug submittal code. | |
495 @cindex @file{ilisp-bug.el} | |
496 | |
497 @item compat.el | |
498 Compatibility code between fsf-18, fsf-19 and lemacs-19. | |
499 @cindex @file{compat.el} | |
500 | |
501 @item ilisp-inp.el | |
502 Buffer input module. | |
503 @cindex @file{ilisp-inp.el} | |
504 | |
505 @item ilisp-def.el | |
506 Variable definitions. | |
507 @cindex @file{ilisp-def.el} | |
508 | |
509 @item ilisp-ind.el | |
510 Indentation code. | |
511 @cindex @file{ilisp-ind.el} | |
512 | |
513 @item ilisp-mov.el | |
514 Buffer-point movement code. | |
515 @cindex @file{ilisp-mov.el} | |
516 | |
517 @item ilisp-key.el | |
518 Keymap setups, including @code{ilisp-lispm-bindings}. | |
519 @cindex @file{ilisp-key.el} | |
520 | |
521 @item ilisp-doc.el | |
522 ILISP mode documenation. | |
523 @cindex @file{ilisp-doc.el} | |
524 | |
525 @item ilisp-mod.el | |
526 ILISP mode definition. | |
527 @cindex @file{ilisp-mod.el} | |
528 | |
529 @item ilisp-prn.el | |
530 Parenthesis handling. | |
531 @cindex @file{ilisp-prn.el} | |
532 | |
533 @item ilisp-el.el | |
534 Emacs-lisp additions. | |
535 @cindex @file{ilisp-el.el} | |
536 | |
537 @item ilisp-sym.el | |
538 ILISP symbol handling. | |
539 @cindex @file{ilisp-sym.el} | |
540 | |
541 @item ilisp-low.el | |
542 Low level interface code. | |
543 @cindex @file{ilisp-low.el} | |
544 | |
545 @item ilisp-hi.el | |
546 High level interface code. | |
547 @cindex @file{ilisp-hi.el} | |
548 | |
549 @item ilisp-out.el | |
550 Output handling, include typeout window (a popper replacement). | |
551 @cindex @file{ilisp-out.el} | |
552 | |
553 @item ilisp-prc.el | |
554 Process handling code. | |
555 @cindex @file{ilisp-prc.el} | |
556 | |
557 @item ilisp-val.el | |
558 Buffer value interface. | |
559 @cindex @file{ilisp-val.el} | |
560 | |
561 @item ilisp-rng.el | |
562 Match ring code. | |
563 @cindex @file{ilisp-rng.el} | |
564 | |
565 @item ilisp-utl.el | |
566 Misc. utilities. | |
567 @cindex @file{ilisp-utl.el} | |
568 | |
569 @item ilisp-hnd.el | |
570 Error handling. | |
571 @cindex @file{ilisp-hnd.el} | |
572 | |
573 @item ilisp-kil.el | |
574 Interface to reset/kill/abort inferior lisp. | |
575 @cindex @file{ilisp-kil.el} | |
576 | |
577 @item ilisp-snd.el | |
578 ilisp-send definitions and associated code. | |
579 @cindex @file{ilisp-snd.el} | |
580 | |
581 @item ilisp-cmt.el | |
582 Comint related code/setup. | |
583 @cindex @file{ilisp-cmt.el} | |
584 | |
585 @item ilisp-cmp.el | |
586 ILISP completer related code. | |
587 @cindex @file{ilisp-cmp.el} | |
588 | |
589 @item ilisp-xfr.el | |
590 Transfer between lisp <-> emacs code. | |
591 @cindex @file{ilisp-xfr.el } | |
592 | |
593 @item ilisp-cl.el | |
594 Commo-Lisp dialect definition. | |
595 @cindex @file{ilisp-cl.el} | |
596 | |
597 @item ilisp-src.el | |
598 ILISP source code module. | |
599 @cindex @file{ilisp-src.el} | |
600 | |
601 @item ilisp-bat.el | |
602 ILISP batch code module. | |
603 @cindex @file{ilisp-bat.el} | |
604 | |
605 @item ilisp.el | |
606 File to be loaded, loads in all necessary parts of ILISP. | |
607 @cindex @file{ilisp.el} | |
608 | |
609 @item *.lisp | |
610 ILISP support code. Each dialect will have one of these files. | |
611 | |
612 @item *.lcd | |
613 Package descriptors for the Lisp Code Directory. | |
614 | |
615 @item ilisp.texi | |
616 Texinfo file for ILISP. | |
617 @cindex @file{ilisp.texi} | |
618 | |
619 @end table | |
620 | |
621 @cindex @file{.el} files | |
622 | |
623 @node Autoloading, , Files of ILISP, Installation | |
624 @section How to define autoload entries | |
625 @cindex autoload definitions | |
626 @cindex defining autoloads | |
627 @cindex @file{.emacs} forms | |
628 A complete example of things you may want to add to your @code{.emacs} | |
629 can be found in the in the file @file{ilisp.emacs} in the | |
630 @code{ilisp-directory} what follows is that file. | |
631 | |
632 | |
633 @example | |
634 @c start of ilisp.emacs | |
635 ;;; | |
636 ;;; This file shows examples of some of the things you might want to | |
637 ;;; do to install or customize ILISP. You may not want to include all | |
638 ;;; of them in your .emacs. For example, the default key binding | |
639 ;;; prefix for ILISP is C-z and this file changes the default prefix to | |
640 ;;; C-c. For more information on things that can be changed, see the | |
641 ;;; file ilisp.el. | |
642 ;;; | |
643 | |
644 ;;; If ilisp lives in some non-standard directory, you must tell emacs | |
645 ;;; where to get it. This may or may not be necessary. | |
646 (setq load-path (cons (expand-file-name "~jones/emacs/ilisp/") load-path)) | |
647 | |
648 ;;; If you always want partial minibuffer completion | |
649 (require 'completer) | |
650 | |
651 ;;; If want TMC completion then you will have to Ftp it yourself from think.com | |
652 ;;; It's become to flaky for me to deal with. -- Ivan | |
653 ;;;(load "completion") | |
654 ;;;(initialize-completions) | |
655 | |
656 ;;; If you want to redefine typeout-window keys: | |
657 (add-hook 'ilisp-load-hook | |
658 '(lambda () | |
659 (define-key global-map "\C-c1" 'ilisp-bury-output) | |
660 (define-key global-map "\C-cv" 'ilisp-scroll-output) | |
661 (define-key global-map "\C-cg" 'ilisp-grow-output))) | |
662 | |
663 | |
664 (autoload 'run-ilisp "ilisp" "Select a new inferior LISP." t) | |
665 ;;; Autoload based on your LISP. You only really need the one you use. | |
666 ;;; If called with a prefix, you will be prompted for a buffer and | |
667 ;;; program. | |
668 ;;; | |
669 ;;; [Back to the old way now -- Ivan Mon Jun 28 23:30:51 1993] | |
670 ;;; | |
671 (autoload 'clisp "ilisp" "Inferior generic Common LISP." t) | |
672 (autoload 'allegro "ilisp" "Inferior Allegro Common LISP." t) | |
673 (autoload 'lucid "ilisp" "Inferior Lucid Common LISP." t) | |
674 (autoload 'cmulisp "ilisp" "Inferior CMU Common LISP." t) | |
675 (autoload 'kcl "ilisp" "Inferior Kyoto Common LISP." t) | |
676 (autoload 'akcl "ilisp" "Inferior Austin Kyoto Common LISP." t) | |
677 (autoload 'ibcl "ilisp" "Ibuki Common LISP." t) | |
678 (autoload 'scheme "ilisp" "Inferior generic Scheme." t) | |
679 (autoload 'oaklisp "ilisp" "Inferior Oaklisp Scheme." t) | |
680 | |
681 ;;; Define where LISP programs are found. (This may already be done | |
682 ;;; at your site.) | |
683 (setq allegro-program "/usr/misc/.allegro/bin/cl") | |
684 (setq lucid-program "/usr/misc/.lucid/bin/lisp") | |
685 (setq cmulisp-program "/usr/misc/.cmucl/bin/lisp") | |
686 | |
687 ;;; If you run cmu-cl then set this to where your source files are. | |
688 (setq cmulisp-local-source-directory | |
689 "/usr/local/utils/CMU-CL/") | |
690 | |
691 | |
692 ;;; This makes reading a lisp file load in ilisp. | |
693 (set-default 'auto-mode-alist | |
694 (append '(("\\.lisp$" . lisp-mode)) auto-mode-alist)) | |
695 (setq lisp-mode-hook '(lambda () (require 'ilisp))) | |
696 | |
697 ;;; Sample load hook | |
698 (add-hook 'ilisp-load-hook | |
699 '(lambda () | |
700 ;; Change default key prefix to C-c | |
701 (setq ilisp-prefix "\C-c") | |
702 | |
703 ;; Define LispMachine-like key bindings, too. | |
704 (ilisp-lispm-bindings) | |
705 | |
706 ;; Sample initialization hook. Set the inferior LISP directory to | |
707 ;; the directory of the buffer that spawned it on the first prompt. | |
708 (setq ilisp-init-hook | |
709 '(lambda () | |
710 (default-directory-lisp ilisp-last-buffer))))) | |
711 @c end of ilisp.emacs | |
712 @end example | |
713 | |
714 @c ================================================================== | |
715 @node Starting up, Buffers of ILISP, Installation, Top | |
716 @chapter How to run a Lisp process using ILISP | |
717 @cindex Running lisp | |
718 @cindex Starting up lisp | |
719 @cindex Supported dialects | |
720 @cindex Dialects supported | |
721 @pindex run-ilisp | |
722 @pindex clisp | |
723 @pindex allegro | |
724 @pindex lucid | |
725 @pindex cmulisp | |
726 @pindex kcl | |
727 @pindex akcl | |
728 @pindex ibcl | |
729 @pindex scheme | |
730 @pindex oaklisp | |
731 | |
732 To start a Lisp use @kbd{M-x run-ilisp}, or a specific dialect like | |
733 @kbd{M-x allegro}. If called with a prefix you will be prompted for a | |
734 buffer name and a program to run. The default buffer name is the name | |
735 of the dialect. The default program for a dialect will be the value of | |
736 DIALECT-program or the value of ilisp-program inherited from a less | |
737 specific dialect. If there are multiple LISP's, use the dialect name or | |
738 @kbd{M-x select-ilisp} (@kbd{@key{C-z} S}) to select the current ILISP | |
739 buffer. | |
740 | |
741 Entry into ILISP mode runs the hooks on @code{comint-mode-hook} and | |
742 @code{ilisp-mode-hook} and then DIALECT-hooks specific to LISP | |
743 dialects in the nesting order above. Many dialects call | |
744 @code{ilisp-load-init} in their dialect setup. | |
745 | |
746 These are the currently supported dialects. The dialects | |
747 are listed so that the indentation correponds to the hierarchical | |
748 relationship between dialects. | |
749 @example | |
750 clisp | |
751 allegro | |
752 lucid | |
753 kcl | |
754 akcl | |
755 ibcl | |
756 cmulisp | |
757 scheme | |
758 oaklisp | |
759 @end example | |
760 | |
761 If anyone figures out support for other dialects I would be happy | |
762 to include it in future releases. @xref{Dialects}. | |
763 | |
764 To define a new dialect, @xref{Defining new dialects} and @xref{Customization}. | |
765 | |
766 | |
767 @node Buffers of ILISP, ILISP Commands, Starting up, Top | |
768 @chapter Buffers used by ILISP, and their commands | |
769 @cindex buffers of ILISP | |
770 @cindex ILISP buffers | |
771 @table @code | |
772 | |
773 @item *@var{dialect}* | |
774 The Lisp listener buffer. Forms can be entered in this buffer in, and | |
775 they will be sent to lisp when you hit return if the form is complete. | |
776 This buffer is in ilisp-mode, which is built on top of comint-mode, and | |
777 all comint commands such as history mechanism and job control are | |
778 available. | |
779 @c xref.. | |
780 | |
781 @item @var{lisp-mode-buffers} | |
782 A buffer is assumed to contain Lisp source code if its major mode is in | |
783 the list @code{lisp-source-modes}. If it's loaded into a buffer that is | |
784 in one of these major modes, it's considered a lisp source file by | |
785 @code{find-file-lisp}, @code{load-file-lisp} and | |
786 @code{compile-file-lisp}. | |
787 Used by these commands to determine defaults.@refill | |
788 | |
789 @item @code{*Completions*} | |
790 @cindex @code{*Completions*} buffer | |
791 Used for listing completions of symbols or files by the completion commands. | |
792 @xref{Completion}. | |
793 | |
794 @item *Aborted Commands* | |
795 @cindex @code{*Aborted Commands*} buffer | |
796 @xref{Interrupts}. | |
797 | |
798 @item *Errors* | |
799 @itemx *Output* | |
800 @itemx *Error Output* | |
801 @cindex @code{*Error Output*} buffer | |
802 @cindex @code{*Errors*} buffer | |
803 @cindex @code{*Output*} buffer | |
804 used to pop-up results and errors from the inferior LISP. | |
805 | |
806 @item *ilisp-send* | |
807 @cindex @code{*ilisp-send*} buffer | |
808 Buffer containing the last form sent to the inferior LISP. | |
809 | |
810 @item *Edit-Definitions* | |
811 @itemx *All-Callers* | |
812 @cindex @code{*Edit-Definitions*} buffer | |
813 @cindex @code{*All-Callers*} buffer | |
814 @xref{Source code commands}. | |
815 | |
816 @item *Last-Changes* | |
817 @itemx *Changed-Definitions* | |
818 @cindex @code{*Last-Changes*} buffer | |
819 @cindex @code{*Changed-Definitions*} buffer | |
820 @xref{Batch commands}. | |
821 @end table | |
822 | |
823 @menu | |
824 * Typeout windows:: temporary windows used for display. | |
825 * Switching buffers:: Switching buffers | |
826 @end menu | |
827 | |
828 @node Typeout windows, Switching buffers, , Buffers of ILISP | |
829 @section Typeout windows | |
830 @cindex Typeout windows | |
831 | |
832 All ILISP output is funneled through the function which is bound to | |
833 the hook @code{ilisp-display-output-function}. The function gets | |
834 a single argument, a string, and should make that output visible to | |
835 the user somehow. | |
836 | |
837 One possible choice for output display is | |
838 @code{ilisp-display-output-in-typeout-window}, | |
839 which pops up a window at the top of the current screen which is | |
840 just large enough to display the output. This window can be | |
841 "remote controlled" by the commands @code{ilisp-scroll-output}, | |
842 @code{ilisp-bury-output}, and @code{ilisp-grow-output}. | |
843 | |
844 Unlike the old popper facility, the ilisp typeout window facility | |
845 does not trounce on any existing Emacs functions or on any common | |
846 key bindings, like @kbd{C-x o}. | |
847 | |
848 Other built-in functions which might be useful as values for | |
849 @code{ilisp-display-output-function} include | |
850 @code{ilisp-display-output-default}, | |
851 @code{ilisp-display-output-adaptively}, | |
852 @code{ilisp-display-output-in-lisp-listener}, | |
853 @code{ilisp-display-output-in-temp-buffer}, and | |
854 @code{ilisp-display-output-in-typeout-window}. | |
855 | |
856 The default display function is @code{ilisp-display-output-default}, | |
857 which obeys the @code{lisp-no-popper} variable. | |
858 | |
859 Users are encouraged to write their own output display functions | |
860 to get the exact desired behavior, displaying on a private emacs | |
861 screen, in a pop-up dialog box, or whetever. | |
862 | |
863 | |
864 @table @kbd | |
865 | |
866 @item @key{C-z} 1 (ilisp-bury-output) | |
867 deletes and buries the typeout output window. | |
868 @kindex C-z 1 | |
869 @pindex ilisp-bury-output | |
870 @cindex bury output window | |
871 | |
872 | |
873 @item @key{C-z} v (ilisp-scroll-output) | |
874 scrolls the output window if it is showing, otherwise does nothing. | |
875 If it is called with a negative prefix, it will scroll backwards. | |
876 @cindex scrolling output | |
877 @pindex ilisp-scroll-output | |
878 @kindex C-z v | |
879 | |
880 @item @key{C-z} G (ilisp-grow-output) | |
881 will grow the output window if showing by the prefix number of lines. | |
882 @cindex grow output window | |
883 @pindex ilisp-grow-output | |
884 @kindex C-z G | |
885 | |
886 @end table | |
887 | |
888 An alternative to typeout windows is to always have the inferior LISP | |
889 buffer visible and have all output go there. Setting | |
890 @code{lisp-no-popper} to @code{t} will cause all output to go to the | |
891 inferior LISP buffer. Setting @code{lisp-no-popper} to @code{'message} | |
892 will make output of one line go to the message window. Setting | |
893 @code{comint-always-scroll} to @code{t} will cause process output to | |
894 always be visible. If a command gets an error, you will be left in the | |
895 break loop.@refill | |
896 | |
897 @cindex Turning off typeout windows | |
898 @vindex comint-always-scroll | |
899 @vindex lisp-no-popper | |
900 | |
901 | |
902 | |
903 @node Switching buffers, ,Typeout windows, Buffers of ILISP | |
904 @section Switching buffers | |
905 | |
906 Commands to make switching between buffers easier. | |
907 @cindex Switching buffers | |
908 | |
909 @table @kbd | |
910 @item @key{C-z} b (switch-to-lisp) | |
911 @kindex @key{C-z} b | |
912 @pindex switch-to-lisp | |
913 will pop to the current ILISP buffer or if already in an ILISP buffer, | |
914 it will return to the buffer that last switched to an ILISP buffer. | |
915 With a prefix, it will also go to the end of the buffer. If you do not | |
916 want it to pop, set @code{pop-up-windows} to nil. | |
917 @vindex pop-up-windows | |
918 | |
919 | |
920 @item M-C-l (previous-buffer-lisp) | |
921 will switch to the last visited buffer in the current window or the Nth | |
922 previous buffer with a prefix. | |
923 @cindex Previous lisp buffer | |
924 @pindex previous-buffer-lisp | |
925 @kindex M-C-l | |
926 | |
927 @end table | |
928 | |
929 | |
930 @node ILISP Commands, Customization, Buffers of ILISP, Top | |
931 @chapter ILISP Commands | |
932 | |
933 | |
934 Most of these key bindings work in both Lisp Mode and ILISP mode. | |
935 There are a few additional and-go bindings found in Lisp Mode. | |
936 | |
937 | |
938 @menu | |
939 * Eval and compile functions:: | |
940 * Documentation functions:: | |
941 * Macroexpansion:: | |
942 * Tracing functions:: | |
943 * Package Commands:: | |
944 * Source code commands:: Working on several files | |
945 * Batch commands:: Grouping changes for eval/compile | |
946 * Files and directories:: | |
947 * Keyboard modes:: Interactive and raw keyboard modes | |
948 * Interrupts:: Interrupts, aborts, and errors | |
949 * Command history:: | |
950 * Completion:: | |
951 * Miscellany:: Indentation, parenthesis balancing, | |
952 and comment commands. | |
953 @end menu | |
954 | |
955 @node Eval and compile functions, Documentation functions, , ILISP Commands | |
956 @section Eval and compile functions | |
957 @cindex Eval/compile commands | |
958 @cindex Compile/eval commands | |
959 | |
960 In LISP, the major unit of interest is a form, which is anything between | |
961 two matching parentheses. Some of the commands here also refer to | |
962 ``defun,'' which is a list that starts at the left margin in a LISP | |
963 buffer, or after a prompt in the ILISP buffer. These commands refer to | |
964 the ``defun'' that contains the point. | |
965 @cindex Defun | |
966 | |
967 ``A call'' refers to a reference to a function call for a function or | |
968 macro, or a reference to a variable. Commands which ``insert a call'' | |
969 in the ILISP buffer will bring up the last command which matches it or | |
970 else will insert a template for a call. | |
971 @cindex Call | |
972 | |
973 When an eval is done of a single form matching @code{ilisp-defvar-regexp} | |
974 the corresponding symbol will be unbound and the value assigned again. | |
975 @vindex ilisp-defvar-regexp | |
976 | |
977 When you send a form to LISP, the status light will reflect the | |
978 progress of the command. In a lisp mode buffer the light will reflect | |
979 the status of the currently selected inferior LISP unless | |
980 @code{lisp-show-status} is nil. If you want to find out what command is | |
981 currently running, use the command @kbd{@key{C-z} s} (status-lisp). | |
982 If you call it with a prefix, the pending commands will be displayed as | |
983 well.@refill | |
984 @cindex Currently running command | |
985 @cindex Displaying commands | |
986 @pindex status-lisp | |
987 @kindex @key{C-z} s | |
988 @vindex lisp-show-status | |
989 @cindex Status light | |
990 @cindex Modeline status | |
991 | |
992 Note that in this table as elsewhere, the key @key{C-z} (ilisp-prefix) | |
993 is used as a prefix character for ILISP commands, though this may be | |
994 changed. | |
995 @kindex @key{C-z} prefix | |
996 @vindex ilisp-prefix | |
997 @c xref .. custom? or autoload? | |
998 For a full list of key-bindings, use @kbd{M-x describe-mode} or | |
999 @kbd{M-x describe-bindings} while in an ILISP-mode buffer.@refill | |
1000 @cindex Listing bindings | |
1001 @cindex Describing bindings | |
1002 | |
1003 | |
1004 The eval/compile commands verify that their expressions are balanced and | |
1005 then send the form to the inferior LISP. If called with a positive | |
1006 prefix, the result of the operation will be inserted into the buffer | |
1007 after the form that was just sent. | |
1008 @cindex Inserting results | |
1009 | |
1010 For commands which operate on a region, the result of the compile or eval | |
1011 is the last form in the region. | |
1012 @cindex Region commands | |
1013 | |
1014 The @samp{and-go} versions will perform the operation and then | |
1015 immediately switch to the ILISP buffer where you will see the results of | |
1016 executing your form. If @code{eval-defun-and-go-lisp} or | |
1017 @code{compile-defun-and-go-lisp} is called with a prefix, a call for the | |
1018 form will be inserted as well.@refill | |
1019 @cindex Inserting calls | |
1020 @pindex compile-defun-and-go-lisp | |
1021 @pindex eval-defun-and-go-lisp | |
1022 @cindex @samp{and-go} functions | |
1023 | |
1024 @table @kbd | |
1025 | |
1026 @item @key{C-z} | |
1027 The prefix-key for most ILISP commands. This can be changed by setting | |
1028 the variable @code{ilisp-prefix}. | |
1029 @c xref custom? | |
1030 | |
1031 @item RET (return-ilisp) | |
1032 In ILISP-mode buffer, sends the current form to lisp if complete, | |
1033 otherwise creates a new line and indents. If you edit old input, the | |
1034 input will be copied to the end of the buffer first and then sent. | |
1035 @cindex Sending input to lisp | |
1036 @pindex return-ilisp | |
1037 @kindex RET | |
1038 | |
1039 @item C-] (close-and-send-lisp) | |
1040 Closes the current sexp, indents it, and then sends it to the current | |
1041 inferior LISP. | |
1042 @pindex close-and-send-lisp | |
1043 @kindex C-] | |
1044 | |
1045 @item LFD (newline-and-indent-lisp) | |
1046 Insert a new line and then indent to the appropriate level. If called | |
1047 at the end of the inferior LISP buffer and an sexp, the sexp will be | |
1048 sent to the inferior LISP without a trailing newline. | |
1049 @pindex newline-and-indent-lisp | |
1050 @kindex LFD | |
1051 | |
1052 @item @key{C-z} e (eval-defun-lisp) | |
1053 @itemx M-C-x (eval-defun-lisp) | |
1054 @itemx @key{C-z} C-e (eval-defun-and-go-lisp) | |
1055 @kindex M-C-x | |
1056 @kindex @key{C-z} e | |
1057 @kindex @key{C-z} C-e | |
1058 Send the defun to lisp. | |
1059 @pindex eval-defun-and-go-lisp | |
1060 @pindex eval-defun-lisp | |
1061 | |
1062 @item @key{C-z} r (eval-region-lisp) | |
1063 @itemx @key{C-z} C-r (eval-region-and-go-lisp) | |
1064 @kindex @key{C-z} r | |
1065 @pindex eval-region-lisp | |
1066 @kindex @key{C-z} C-r | |
1067 @pindex eval-region-and-go-lisp | |
1068 @cindex Eval region | |
1069 | |
1070 @item @key{C-z} n (eval-next-sexp-lisp) | |
1071 @itemx @key{C-z} C-n (eval-next-sexp-and-go-lisp) | |
1072 @kindex @key{C-z} n | |
1073 @pindex eval-next-sexp-lisp | |
1074 @kindex @key{C-z} C-n | |
1075 @pindex eval-next-sexp-and-go-lisp | |
1076 | |
1077 @item @key{C-z} c (compile-defun-lisp) | |
1078 @kindex @key{C-z} c | |
1079 @pindex compile-defun-lisp | |
1080 @item @key{C-z} C-c (compile-defun-lisp-and-go) | |
1081 @kindex @key{C-z} C-c | |
1082 When @code{compile-defun-lisp} is called in an inferior LISP buffer with | |
1083 no current form, the last form typed to the top-level will be compiled. | |
1084 @cindex Compile last form | |
1085 @pindex compile-defun-lisp-and-go | |
1086 | |
1087 @item @key{C-z} w (compile-region-lisp) | |
1088 @itemx @key{C-z} C-w (compile-region-and-go-lisp) | |
1089 @kindex @key{C-z} w | |
1090 @pindex compile-region-lisp | |
1091 @kindex @key{C-z} C-w | |
1092 @pindex compile-region-and-go-lisp | |
1093 @cindex Compile region | |
1094 | |
1095 @end table | |
1096 | |
1097 | |
1098 If any of the forms contain an interactive command, then the command | |
1099 will never return. To get out of this state, you need to use | |
1100 @code{abort-commands-lisp} (@kbd{@key{C-z} g}). If @code{lisp-wait-p} | |
1101 is t, then EMACS will display the result of the command in the | |
1102 minibuffer or a pop-up window. If @code{lisp-wait-p} is @code{nil}, | |
1103 (the default) the send is done asynchronously and the results will be | |
1104 brought up only if there is more than one line or there is an error. In | |
1105 this case, you will be given the option of ignoring the error, keeping | |
1106 it in another buffer or keeping it and aborting all pending sends. If | |
1107 there is not a command already running in the inferior LISP, you can | |
1108 preserve the break loop. If called with a negative prefix, the sense of | |
1109 @code{lisp-wait-p} will be inverted for the next command. | |
1110 @c @cindex Aborting commands | |
1111 @vindex lisp-wait-p | |
1112 @kindex @key{C-z} g | |
1113 @pindex abort-commands-lisp | |
1114 | |
1115 | |
1116 | |
1117 @node Documentation functions, Macroexpansion, Eval and compile functions, ILISP Commands | |
1118 @section Documentation functions | |
1119 | |
1120 @code{describe-lisp}, @code{inspect-lisp}, @code{arglist-lisp}, and | |
1121 @code{documentation-lisp} switch whether they prompt for a response or | |
1122 use a default when called with a negative prefix. If they are | |
1123 prompting, there is completion through the inferior LISP by using | |
1124 @kbd{TAB} or @kbd{M-TAB}. When entering an expression in the | |
1125 minibuffer, all of the normal ilisp commands like @code{arglist-lisp} | |
1126 also work.@refill | |
1127 @cindex Arglist lisp | |
1128 @cindex Describing lisp objects | |
1129 @kindex @key{M-TAB} | |
1130 @kindex @key{TAB} | |
1131 @cindex Negative prefix | |
1132 @cindex Minibuffer completion | |
1133 @pindex documentation-lisp | |
1134 @pindex arglist-lisp | |
1135 @pindex describe-lisp | |
1136 @pindex inspect-lisp | |
1137 @cindex Documentation Functions | |
1138 | |
1139 Commands that work on a function will use the nearest previous function | |
1140 symbol. This is either a symbol after a @samp{#'} or the symbol at the | |
1141 start of the current list. | |
1142 | |
1143 @table @code | |
1144 | |
1145 @item @key{C-z} a (arglist-lisp) | |
1146 @kindex @key{C-z} a | |
1147 Return the arglist of the current function. With a numeric prefix, the | |
1148 leading paren will be removed and the arglist will be inserted into the | |
1149 buffer. | |
1150 | |
1151 @item @key{C-z} d (documentation-lisp) | |
1152 @kindex @key{C-z} d | |
1153 Infers whether function or variable documentation is desired. With a | |
1154 negative prefix, you can specify the type of documentation as well. | |
1155 With a positive prefix the documentation of the current function call is | |
1156 inserted into the buffer. | |
1157 | |
1158 @item @key{C-z} i (describe-lisp) | |
1159 @kindex @key{C-z} i | |
1160 Describe the previous sexp (it is evaluated). If there is no previous | |
1161 sexp and if called from inside an ILISP buffer, the previous result will | |
1162 be described. | |
1163 | |
1164 @item @key{C-z} i (describe-lisp) | |
1165 @kindex @key{C-z} i | |
1166 Describe the previous sexp (it is evaluated). If there is no previous | |
1167 sexp and if called from inside an ILISP buffer, the previous result will | |
1168 be described. | |
1169 | |
1170 @item @key{C-z} I (inspect-lisp) | |
1171 @kindex @key{C-z} I | |
1172 Switch to the current inferor LISP and inspect the previous sexp (it is | |
1173 evaluated). If there is no previous sexp and if called from inside an | |
1174 ILISP buffer, the previous result will be inspected. | |
1175 | |
1176 @item @key{C-z} D (fi:clman) | |
1177 @itemx @key{C-z} A (fi:clman-apropos) | |
1178 @kindex @key{C-z} D | |
1179 @pindex fi:clman | |
1180 @kindex @key{C-z} A | |
1181 @pindex fi:clman-apropos | |
1182 If the Franz online Common LISP manual is available, get information on | |
1183 a specific symbol. @code{fi:clman-apropos} will get information apropos | |
1184 a specific string. Some of the documentation is specific to the allegro | |
1185 dialect, but most of it is for standard Common LISP. | |
1186 @cindex Apropos help | |
1187 @cindex Common Lisp manual | |
1188 @cindex Franz manual | |
1189 | |
1190 @end table | |
1191 | |
1192 | |
1193 @node Macroexpansion, Tracing functions, Documentation functions, ILISP Commands | |
1194 @section Macroexpansion | |
1195 | |
1196 @table @kbd | |
1197 @item @key{C-z} M (macroexpand-lisp) | |
1198 @itemx @key{C-z} m (macroexpand-1-lisp) | |
1199 @kindex @key{C-z} M | |
1200 @pindex macroexpand-lisp | |
1201 @kindex @key{C-z} m | |
1202 @pindex macroexpand-1-lisp | |
1203 These commands apply to the next sexp. If called with a positive | |
1204 numeric prefix, the result of the macroexpansion will be inserted into | |
1205 the buffer. With a negative prefix, prompts for expression to expand. | |
1206 @cindex Expanding macro forms | |
1207 @cindex Macroexpansion | |
1208 | |
1209 | |
1210 @end table | |
1211 | |
1212 @node Tracing functions, Package Commands, Macroexpansion, ILISP Commands | |
1213 @section Tracing functions | |
1214 | |
1215 @table @kbd | |
1216 @item @key{C-z} t (trace-defun-lisp) | |
1217 @kindex @key{C-z} t | |
1218 @pindex trace-defun-lisp | |
1219 @cindex Tracing defuns | |
1220 @cindex Untracing defuns | |
1221 traces the current defun. When called with a numeric prefix the | |
1222 function will be untraced. When called with negative prefix, prompts | |
1223 for function to be traced. | |
1224 @end table | |
1225 | |
1226 @node Package Commands, Source code commands, Tracing functions, ILISP Commands | |
1227 @section Package Commands | |
1228 @cindex Package commands | |
1229 | |
1230 The first time an inferior LISP mode command is executed in a Lisp Mode | |
1231 buffer, the package will be determined by using the regular expression | |
1232 @code{ilisp-package-regexp} to find a package sexp and then passing that | |
1233 sexp to the inferior LISP through @code{ilisp-package-command}. | |
1234 For the @samp{clisp} dialect, this will find the first @code{(in-package | |
1235 PACKAGE)} form in the file. | |
1236 A buffer's package will be displayed in the mode line. | |
1237 If a buffer has no | |
1238 specification, forms will be evaluated in the current inferior LISP | |
1239 package.@refill | |
1240 | |
1241 Buffer package caching can be turned off by setting the variable | |
1242 @code{lisp-dont-cache-package} to @code{T}. This will force ILISP to | |
1243 search for the closest previous @code{ilisp-package-regexp} in the | |
1244 buffer each time an inferior LISP mode command is executed. | |
1245 @cindex Buffer package | |
1246 @cindex Buffer package caching | |
1247 @vindex lisp-dont-cache-package | |
1248 @vindex ilisp-package-regexp | |
1249 @findex ilisp-package-command | |
1250 @cindex In-package form | |
1251 | |
1252 @table @code | |
1253 | |
1254 @item @key{C-z} p (package-lisp) | |
1255 @kindex @key{C-z} p | |
1256 @pindex package-lisp | |
1257 @cindex Show current package | |
1258 Show the current package of the inferior LISP. | |
1259 | |
1260 @item @key{C-z} P (set-package-lisp) | |
1261 @kindex @key{C-z} P | |
1262 @pindex set-package-lisp | |
1263 Set the inferior LISP package to the current buffer's package or with a | |
1264 prefix to a manually entered package. | |
1265 | |
1266 @item M-x set-buffer-package-lisp | |
1267 @kindex M-x set-buffer-package-lisp | |
1268 @cindex Set buffer package | |
1269 @pindex set-buffer-package-lisp | |
1270 Set the buffer's package from the buffer. If it is called with a | |
1271 prefix, the package can be set manually. | |
1272 | |
1273 @end table | |
1274 | |
1275 @node Source code commands, Batch commands, Package Commands, ILISP Commands | |
1276 @section Source Code Commands | |
1277 @cindex Source Code Commands | |
1278 @cindex Finding source | |
1279 | |
1280 The following commands all deal with finding things in source code. | |
1281 The first time that one of these commands is used, there may be some | |
1282 delay while the source module is loaded. When searching files, the | |
1283 first applicable rule is used: | |
1284 @itemize @bullet | |
1285 @item | |
1286 try the inferior LISP, | |
1287 @item | |
1288 try a tags file if defined, | |
1289 @item | |
1290 try all buffers in one of @code{lisp-source-modes} or all files | |
1291 defined using @code{lisp-directory}.@refill | |
1292 @pindex lisp-directory | |
1293 @vindex lisp-source-modes | |
1294 @end itemize | |
1295 | |
1296 @code{M-x lisp-directory} defines a set of files to be | |
1297 searched by the source code commands. It prompts for a directory and | |
1298 sets the source files to be those in the directory that match entries | |
1299 in @code{auto-mode-alist} for modes in @code{lisp-source-modes}. | |
1300 With a positive | |
1301 prefix, the files are appended. With a negative prefix, all current | |
1302 buffers that are in one of @code{lisp-source-modes} will be searched. This | |
1303 is also what happens by default. Using this command stops using a | |
1304 tags file.@refill | |
1305 @cindex Source modes | |
1306 @vindex auto-mode-alist | |
1307 @kindex M-x lisp-directory | |
1308 | |
1309 @code{edit-definitions-lisp}, @code{who-calls-lisp}, and | |
1310 @code{edit-callers-lisp} will switch whether they prompt for a response | |
1311 or use a default when called with a negative prefix. If they are | |
1312 prompting, there is completion through the inferior LISP by using | |
1313 @kbd{TAB} or @kbd{M-TAB}. When entering an expression in the | |
1314 minibuffer, all of the normal ILISP commands like @kbd{arglist-lisp} | |
1315 also work.@refill | |
1316 @pindex edit-callers-lisp | |
1317 @pindex who-calls-lisp | |
1318 @pindex edit-definitions-lisp | |
1319 | |
1320 @code{edit-definitions-lisp} (@kbd{M-.}) will find a | |
1321 particular type of definition for a symbol. It tries to use the rules | |
1322 described above. The files to be searched are listed in the buffer | |
1323 @code{*Edit-Definitions*}. If @code{lisp-edit-files} is nil, no search will be | |
1324 done if not found through the inferior LISP. The variable | |
1325 @code{ilisp-locator} contains a function that when given the name and type | |
1326 should be able to find the appropriate definition in the file. There | |
1327 is often a flag to cause your LISP to record source files that you | |
1328 will need to set in the initialization file for your LISP. The | |
1329 variable is @code{*record-source-files*} in both allegro and lucid. Once a | |
1330 definition has been found, @code{next-definition-lisp} | |
1331 (@kbd{M-,}) will find the next definition | |
1332 (or the previous definition with a prefix).@refill | |
1333 @pindex next-definition-lisp | |
1334 @vindex *record-source-files* | |
1335 @vindex ilisp-locator | |
1336 @vindex lisp-edit-files | |
1337 @cindex @code{*Edit-Definitions*} buffer | |
1338 @kindex M-. | |
1339 | |
1340 @code{edit-callers-lisp} (@kbd{@key{C-z} ^}) will generate a list of all | |
1341 of the callers of a function in the current inferior LISP and edit the | |
1342 first caller using @code{edit-definitions-lisp}. Each successive call to | |
1343 @code{next-caller-lisp} (@kbd{M-`}) will edit the next caller | |
1344 (or the previous caller with a prefix). The list is stored in the | |
1345 buffer @code{*All-Callers*}. You can also look at the callers by doing | |
1346 @kbd{M-x who-calls-lisp}.@refill | |
1347 @cindex List callers | |
1348 @cindex Find callers | |
1349 @cindex @code{*All-Callers*} buffer | |
1350 @kindex M-x who-calls-lisp | |
1351 @kindex M-` | |
1352 @pindex next-caller-lisp | |
1353 @kindex @key{C-z} ^ | |
1354 @pindex edit-callers-lisp | |
1355 | |
1356 @code{search-lisp} (@kbd{M-?}) will search the current tags files, | |
1357 @code{lisp-directory} files or buffers in one of @code{lisp-source-modes} for a | |
1358 string or a regular expression when called with a prefix. | |
1359 @code{next-definition-lisp} (@kbd{M-,}) will find the next definition | |
1360 (or the previous definition with a prefix).@refill | |
1361 @cindex Next definition | |
1362 @cindex Previous definition | |
1363 @kindex M-, | |
1364 @pindex next-definition-lisp | |
1365 @kindex M-? | |
1366 @pindex search-lisp | |
1367 | |
1368 @code{replace-lisp} (@kbd{M-"}) will replace a string (or a regexp with | |
1369 a prefix) in the current tags files, @code{lisp-directory} files or | |
1370 buffers in one of @code{lisp-source-modes}.@refill | |
1371 @cindex Replace lisp | |
1372 @kindex M-" | |
1373 @pindex replace-lisp | |
1374 | |
1375 | |
1376 Here is a summary of the above commands (behavior when given prefix | |
1377 argument is given in parentheses): | |
1378 | |
1379 @table @code | |
1380 @item M-x lisp-directory | |
1381 Define a set of files to be used by the source code commands. | |
1382 | |
1383 @item M-. (edit-definitions-lisp) | |
1384 Find definition of a symbol. | |
1385 | |
1386 @item M-, (next-definition-lisp) | |
1387 Find next (previous) definition. | |
1388 | |
1389 @item @key{C-z} ^ (edit-callers-lisp) | |
1390 Find all callers of a function, and edit the first. | |
1391 | |
1392 @item M-` (next-caller-lisp) | |
1393 Edit next (previous) caller of function set by @code{edit-callers-lisp}. | |
1394 | |
1395 @item M-x who-calls-lisp | |
1396 List all the callers of a function. | |
1397 | |
1398 | |
1399 @item M-? (search-lisp) | |
1400 Search for string (regular expression) in current tags, | |
1401 @code{lisp-directory} files or buffers. Use @code{next-definition-lisp} | |
1402 to find next occurence. | |
1403 | |
1404 @item M-" (replace-lisp) | |
1405 Replace a string (regular expression) in files. | |
1406 | |
1407 @end table | |
1408 | |
1409 | |
1410 @node Batch commands, Files and directories, Source code commands, ILISP Commands | |
1411 @section Batch commands | |
1412 | |
1413 | |
1414 The following commands all deal with making a number of changes all at | |
1415 once. The first time one of these commands is used, there may be some | |
1416 delay as the module is loaded. The eval/compile versions of these | |
1417 commands are always executed asynchronously. | |
1418 @cindex Group changes | |
1419 @cindex File changes | |
1420 @cindex Change commands | |
1421 | |
1422 @code{mark-change-lisp} (@kbd{@key{C-z} SPC}) marks the current defun as | |
1423 being changed. A prefix causes it to be unmarked. @code{clear-changes-lisp} | |
1424 (@kbd{@key{C-z} * 0}) will clear all of the changes. | |
1425 @code{list-changes-lisp} (@kbd{@key{C-z} * l}) will show the forms | |
1426 currently marked.@refill | |
1427 @cindex Marking changes | |
1428 @cindex Clearing changes | |
1429 @cindex Listing changes | |
1430 @kindex @key{C-z} * l | |
1431 @kindex @key{C-z} * 0 | |
1432 @kindex @key{C-z} SPC | |
1433 @pindex list-changes-lisp | |
1434 @pindex clear-changes-lisp | |
1435 @pindex mark-change-lisp | |
1436 | |
1437 @code{eval-changes-lisp} (@kbd{@key{C-z} * e}), or | |
1438 @code{compile-changes-lisp} (@kbd{@key{C-z} * c}) will | |
1439 evaluate or compile these changes as appropriate. | |
1440 If called with a positive prefix, the changes will be kept. | |
1441 If there is an error, the process will stop and show the error | |
1442 and all remaining changes will remain in the list. All of the results | |
1443 will be kept in the buffer @code{*Last-Changes*}.@refill | |
1444 @cindex Eval'ing changes | |
1445 @cindex Compiling changes | |
1446 @cindex @code{*Last-Changes*} buffer | |
1447 @kindex @key{C-z} * e | |
1448 @kindex @key{C-z} * c | |
1449 @pindex compile-changes-lisp | |
1450 @pindex eval-changes-lisp | |
1451 | |
1452 @noindent | |
1453 Summary: | |
1454 | |
1455 @table @code | |
1456 @item @key{C-z} SPC (mark-change-lisp) | |
1457 Mark (unmark) current defun as changed. | |
1458 @item @key{C-z} * e (eval-changes-lisp) | |
1459 @itemx @key{C-z} * c (compile-changes-lisp) | |
1460 Call with a positive prefix to keep changes. | |
1461 @item @key{C-z} * 0 (clear-changes-lisp) | |
1462 @item @key{C-z} * l (list-changes-lisp) | |
1463 @end table | |
1464 | |
1465 | |
1466 @node Files and directories, Keyboard modes, Batch commands, ILISP Commands | |
1467 @section Files and directories | |
1468 | |
1469 @cindex Files and directories | |
1470 @cindex Directories and files | |
1471 @cindex Current directory | |
1472 File commands in lisp-source-mode buffers keep track of the last used | |
1473 directory and file. If the point is on a string, that will be the | |
1474 default if the file exists. If the buffer is one of | |
1475 @code{lisp-source-modes}, the buffer file will be the default. Otherwise, | |
1476 the last file used in a lisp-source-mode will be used. | |
1477 | |
1478 | |
1479 @table @kbd | |
1480 @item C-x C-f (find-file-lisp) | |
1481 @kindex C-x C-f | |
1482 @cindex Find file | |
1483 @cindex Lisp find file | |
1484 @cindex Symbolic link expansion | |
1485 @pindex find-file-lisp | |
1486 will find a file. If it is in a string, that will be used as the | |
1487 default if it matches an existing file. Symbolic links are expanded so | |
1488 that different references to the same file will end up with the same | |
1489 buffer. | |
1490 | |
1491 @item @key{C-z} l (load-file-lisp) | |
1492 @kindex @key{C-z} l | |
1493 will load a file into the inferior LISP. You will be given the | |
1494 opportunity to save the buffer if it has changed and to compile the file | |
1495 if the compiled version is older than the current version. | |
1496 @pindex load-file-lisp | |
1497 @cindex Loading files | |
1498 | |
1499 @item @key{C-z} k (compile-file-lisp) | |
1500 @kindex @key{C-z} k | |
1501 will compile a file in the current inferior LISP. | |
1502 @pindex compile-file-lisp | |
1503 @cindex Compiling files | |
1504 | |
1505 @item @key{C-z} ! (default-directory-lisp) | |
1506 @kindex @key{C-z} ! | |
1507 sets the default inferior LISP directory to the directory of the current | |
1508 buffer. If called in an inferior LISP buffer, it sets the Emacs | |
1509 @code{default-directory} to the LISP default directory. | |
1510 @vindex default-directory | |
1511 @cindex Default directory | |
1512 @cindex Set default directory | |
1513 @pindex default-directory-lisp | |
1514 | |
1515 @end table | |
1516 | |
1517 @node Keyboard modes, Interrupts, Files and directories, ILISP Commands | |
1518 @section Switching between interactive and raw keyboard modes | |
1519 | |
1520 @cindex Raw keyboard mode | |
1521 @cindex Interactive keyboard mode | |
1522 @vindex ilisp-raw-echo | |
1523 | |
1524 There are two keyboard modes for interacting with the inferior LISP, | |
1525 \"interactive\" and \"raw\". Normally you are in interactive mode | |
1526 where keys are interpreted as commands to EMACS and nothing is sent to | |
1527 the inferior LISP unless a specific command does so. In raw mode, all | |
1528 characters are passed directly to the inferior LISP without any | |
1529 interpretation as EMACS commands. Keys will not be echoed unless | |
1530 ilisp-raw-echo is T. | |
1531 | |
1532 @pindex raw-keys-ilisp | |
1533 @kindex @key{C-z} # | |
1534 @pindex io-bridge-ilisp | |
1535 @kindex M-x io-bridge-ilisp | |
1536 | |
1537 Raw mode can be turned on interactively by the command | |
1538 @code{raw-keys-ilisp} (@kbd{@key{C-z} #}) and will continue until you | |
1539 type @key{C-g}. Raw mode can also be turned on/off by inferior LISP | |
1540 functions if the command @code{io-bridge-ilisp} (M-x io-bridge-ilisp) | |
1541 has been executed in the inferior LISP either interactively or on a | |
1542 hook. To turn on raw mode, a function should print ^[1^] and to turn | |
1543 it off should print ^[0^]. An example in Common LISP would be: | |
1544 | |
1545 @code{(progn (format t "1") (print (read-char)) (format t "0"))} | |
1546 | |
1547 @node Interrupts, Command history, Keyboard modes, ILISP Commands | |
1548 @section Interrupts, aborts, and errors | |
1549 | |
1550 | |
1551 If you want to abort the last command you can use @kbd{C-g}. | |
1552 @kindex C-g | |
1553 @cindex Errors | |
1554 @cindex Aborting commands | |
1555 @cindex Interrupting commands | |
1556 | |
1557 If you want to abort all commands, you should use the command | |
1558 @code{abort-commands-lisp} (@kbd{@key{C-z} g}). Commands that are | |
1559 aborted will be put in the buffer @code{*Aborted Commands*} so that | |
1560 you can see what was aborted. If you want to abort the currently | |
1561 running top-level command, use @code{interrupt-subjob-ilisp} (@kbd{C-c | |
1562 C-c}). As a last resort, @kbd{M-x panic-lisp} will reset the ILISP | |
1563 state without affecting the inferior LISP so that you can see what is | |
1564 happening. | |
1565 | |
1566 @pindex interrupt-subjob-ilisp | |
1567 @cindex @code{*Aborted Commands*} buffer | |
1568 @kindex @key{C-z} g | |
1569 @pindex abort-commands-lisp | |
1570 @pindex panic-lisp | |
1571 | |
1572 @code{delete-char-or-pop-ilisp} (@kbd{C-d}) will delete | |
1573 prefix characters unless you are at the end of an ILISP buffer in | |
1574 which case it will pop one level in the break loop. | |
1575 @cindex Pop in break loop | |
1576 @cindex Break loop | |
1577 @kindex C-d | |
1578 @pindex delete-char-or-pop-ilisp | |
1579 | |
1580 @code{reset-ilisp}, (@kbd{@key{C-z} z}) will reset the current inferior | |
1581 LISP's top-level so that it will no longer be in a break loop. | |
1582 @cindex Resetting lisp | |
1583 @cindex Top-level, return to | |
1584 @kindex @key{C-z} z | |
1585 @pindex reset-ilisp | |
1586 | |
1587 | |
1588 Summary: | |
1589 | |
1590 @table @kbd | |
1591 @item C-c C-c (interrupt-subjob-ilisp) | |
1592 Send a keyboard interrupt signal to lisp. | |
1593 @item @key{C-z} g (abort-commands-lisp) | |
1594 Abort all running or unsent commands. | |
1595 @item M-x panic-lisp (panic-lisp) | |
1596 Reset the ILISP process state. | |
1597 @item @key{C-z} z (reset-ilisp) | |
1598 Reset lisp to top-level. | |
1599 @item C-d (delete-char-or-pop-ilisp) | |
1600 If at end of buffer, pop a level in break loop. | |
1601 | |
1602 @end table | |
1603 | |
1604 @c duplicated from eval section. | |
1605 If @code{lisp-wait-p} is @code{nil} (the default), | |
1606 all sends are done asynchronously and the results will be | |
1607 brought up only if there is more than one line or there is an error. | |
1608 In case, you will be given the option of ignoring the error, keeping | |
1609 it in another buffer or keeping it and aborting all pending sends. | |
1610 If there is not a command already running in the inferior LISP, you can | |
1611 preserve the break loop. If called with a negative prefix, the sense of | |
1612 @code{lisp-wait-p} will be inverted for the next command. | |
1613 @vindex lisp-wait-p | |
1614 | |
1615 | |
1616 | |
1617 @node Command history, Completion, Interrupts, ILISP Commands | |
1618 @section Command history | |
1619 @cindex Command history | |
1620 @cindex Last command | |
1621 @cindex Previous commands | |
1622 | |
1623 ILISP mode is built on top of @code{comint-mode}, the general | |
1624 command-interpreter-in-a-buffer mode. As such, it inherits many | |
1625 commands and features from this, including a command history mechanism. | |
1626 @cindex @code{comint-mode} | |
1627 | |
1628 Each ILISP buffer has a command history associated with it. Commands | |
1629 that do not match @code{ilisp-filter-regexp} and that are longer than | |
1630 @code{ilisp-filter-length} and that do not match the immediately prior | |
1631 command will be added to this history. | |
1632 @vindex ilisp-filter-length | |
1633 @vindex ilisp-filter-regexp | |
1634 | |
1635 @table @kbd | |
1636 | |
1637 @item M-n (comint-next-input) | |
1638 @itemx M-p (comint-previous-input) | |
1639 @kindex M-n | |
1640 @pindex comint-next-input | |
1641 @cindex Next input | |
1642 @kindex M-p | |
1643 @pindex comint-previous-input | |
1644 Cycle through the input history. | |
1645 | |
1646 @item M-s (comint-previous-similar-input) | |
1647 @kindex M-s | |
1648 @pindex comint-previous-similar-input | |
1649 @cindex Similar input | |
1650 Cycle through input that has the string typed so far as a prefix. | |
1651 | |
1652 @item M-N (comint-psearch-input) | |
1653 @kindex M-N | |
1654 @pindex comint-psearch-input | |
1655 @cindex Search input | |
1656 @cindex Input search | |
1657 Search forwards for prompt. | |
1658 @item M-P (comint-msearch-input) | |
1659 @kindex M-P | |
1660 @pindex comint-msearch-input | |
1661 Search backwards for prompt. | |
1662 | |
1663 @item C-c R (comint-msearch-input-matching) | |
1664 @kindex C-c R | |
1665 @pindex comint-msearch-input-matching | |
1666 Search backwards for occurrence of prompt followed by string which is prompted | |
1667 for (@emph{not} a regular expression). | |
1668 @end table | |
1669 | |
1670 See @code{comint-mode} documentation for more information on | |
1671 @samp{comint} commands. | |
1672 | |
1673 | |
1674 @node Completion, Miscellany, Command history, ILISP Commands | |
1675 @section Completion | |
1676 | |
1677 Commands to reduce number of keystrokes. | |
1678 @cindex Completion | |
1679 @cindex Partial completion | |
1680 @cindex Filename completion | |
1681 | |
1682 @table @kbd | |
1683 @item M-TAB (complete-lisp) | |
1684 @kindex M-TAB | |
1685 @pindex complete-lisp | |
1686 @vindex ilisp-prefix-match | |
1687 will try to complete the previous symbol in the current inferior LISP. | |
1688 Partial completion is supported unless @code{ilisp-prefix-match} is set to @code{t}. | |
1689 (If you set it to @code{t}, inferior LISP completions will be faster.) | |
1690 With partial completion, @samp{p--n} would complete to | |
1691 @samp{position-if-not} in Common LISP. | |
1692 If the symbol follows a left paren or a @samp{#'}, only symbols with | |
1693 function cells will be considered. | |
1694 If the symbol starts with a @samp{*} or you call with a | |
1695 positive prefix all possible completions will be considered. | |
1696 Only external symbols are considered if there is a package qualification | |
1697 with only one colon. | |
1698 The first time you try to complete a string the longest common substring | |
1699 will be inserted and the cursor will be left | |
1700 on the point of ambiguity. | |
1701 If you try to complete again, you can see the possible completions. | |
1702 If you are in a string, then filename completion will be done instead. | |
1703 And if you try to complete a filename twice, you will see a list of | |
1704 possible completions. | |
1705 Filename components are completed individually, so @samp{/u/mi/} could | |
1706 expand to @samp{/usr/misc/}. | |
1707 If you complete with a negative | |
1708 prefix, the most recent completion (symbol or filename) will be undone.@refill | |
1709 | |
1710 | |
1711 @item M-RET (complete) | |
1712 @kindex M-RET | |
1713 @pindex complete | |
1714 @cindex TMC completion | |
1715 will complete the current symbol to the most recently seen symbol in | |
1716 Emacs that matches what you have typed so far. Executing it repeatedly | |
1717 will cycle through potential matches. This is from the TMC completion | |
1718 package and there may be some delay as it is initially loaded. | |
1719 | |
1720 @end table | |
1721 | |
1722 @node Miscellany, , Completion, ILISP Commands | |
1723 @section Miscellany | |
1724 | |
1725 Indentation, parenthesis balancing, and comment commands. | |
1726 | |
1727 @table @kbd | |
1728 | |
1729 @item @kbd{TAB} (indent-line-ilisp) | |
1730 @kindex @kbd{TAB} | |
1731 indents for LISP. With prefix, shifts rest of expression rigidly with | |
1732 the current line. | |
1733 @pindex indent-line-ilisp | |
1734 @cindex Indentation | |
1735 @cindex Rigid indentation | |
1736 | |
1737 | |
1738 @item M-C-q (indent-sexp-ilisp) | |
1739 @kindex M-C-q | |
1740 will indent each line in the next sexp. | |
1741 @pindex indent-sexp-ilisp | |
1742 | |
1743 @item M-q (reindent-lisp) | |
1744 @kindex M-q | |
1745 will reindent the current paragraph if in a comment or string. | |
1746 Otherwise it will close the containing defun and reindent it. | |
1747 @pindex reindent-lisp | |
1748 @cindex Reindent lisp | |
1749 | |
1750 @item @key{C-z} ; (comment-region-lisp) | |
1751 @kindex @key{C-z} ; | |
1752 will put prefix copies of @code{comment-start} before and | |
1753 @code{comment-end}'s after the lines in region. To uncomment a region, | |
1754 use a minus prefix.@refill | |
1755 @pindex comment-region-lisp | |
1756 @cindex Comment region | |
1757 @cindex Uncomment region | |
1758 | |
1759 @item @key{C-z} ) (find-unbalanced-lisp) | |
1760 @kindex @key{C-z} ) | |
1761 will find unbalanced parens in the current buffer. When called with a | |
1762 prefix it will look in the current region. | |
1763 @pindex find-unbalanced-lisp | |
1764 @cindex Find unbalanced parens | |
1765 @cindex Parenthesis balancing | |
1766 | |
1767 @item ] (close-all-lisp) | |
1768 @kindex ] | |
1769 will close all outstanding parens back to the containing form, or a | |
1770 previous left bracket which will be converted to a left parens. If | |
1771 there are too many parens, they will be deleted unless there is text | |
1772 between the last paren and the end of the defun. If called with a | |
1773 prefix, all open left brackets will be closed. | |
1774 @pindex close-all-lisp | |
1775 @cindex Close all parens | |
1776 @cindex Close brackets | |
1777 | |
1778 @end table | |
1779 | |
1780 | |
1781 @node Customization, Dialects, ILISP Commands, Top | |
1782 @chapter ILISP Customization | |
1783 | |
1784 @c = = = = = = = = = = = = = = = = = = = = = = = = | |
1785 @c this refers to hierarchiy, which isn't shown here. | |
1786 @cindex Customization | |
1787 @cindex Hooks | |
1788 @cindex Dialect startup | |
1789 | |
1790 | |
1791 Starting a dialect runs the hooks on @code{comint-mode-hook} | |
1792 and @code{ilisp-mode-hook} and then @var{DIALECT}@code{-hooks} specific | |
1793 to dialects in the nesting order below. | |
1794 @vindex ilisp-mode-hook | |
1795 @vindex comint-mode-hook | |
1796 @example | |
1797 clisp | |
1798 allegro | |
1799 lucid | |
1800 kcl | |
1801 akcl | |
1802 ibcl | |
1803 cmulisp | |
1804 scheme | |
1805 oaklisp | |
1806 @end example | |
1807 | |
1808 On the very first prompt in the inferior LISP, | |
1809 the hooks on @code{ilisp-init-hook} are run. For more information on | |
1810 creating a new dialect or variables to set in hooks, see @file{ilisp.el}. | |
1811 @cindex First prompt | |
1812 @vindex ilisp-init-hook | |
1813 | |
1814 | |
1815 | |
1816 @c -> -> -> -> -> -> -> -> -> -> -> plenty of indexing here | |
1817 @c put these in a table for later expandment | |
1818 @c | |
1819 | |
1820 ILISP Mode Hooks: | |
1821 @cindex ILISP Mode Hooks | |
1822 @table @code | |
1823 @item ilisp-site-hook | |
1824 @vindex ilisp-site-hook | |
1825 Executed when file is loaded | |
1826 @item ilisp-load-hook | |
1827 @vindex ilisp-load-hook | |
1828 Executed when file is loaded | |
1829 @item ilisp-mode-hook | |
1830 @vindex ilisp-mode-hook | |
1831 Executed when an ilisp buffer is created | |
1832 @item ilisp-init-hook | |
1833 @vindex ilisp-init-hook | |
1834 Executed after inferior LISP is initialized and the first prompt is | |
1835 seen. | |
1836 @item @var{DIALECT}-hook | |
1837 @vindex @var{DIALECT}-hook | |
1838 Executed when dialect is set | |
1839 @end table | |
1840 | |
1841 Variables you might want to set in a hook or dialect: | |
1842 @table @code | |
1843 @item ilisp-prefix | |
1844 @vindex ilisp-prefix | |
1845 Keys to prefix ilisp key bindings | |
1846 @item ilisp-program | |
1847 @vindex ilisp-program | |
1848 Program to start for inferior LISP | |
1849 @item ilisp-motd | |
1850 @vindex ilisp-motd | |
1851 String printed on startup with version | |
1852 @item lisp-wait-p | |
1853 @vindex lisp-wait-p | |
1854 Set to T for synchronous sends | |
1855 @item ilisp-handle-errors | |
1856 @vindex ilisp-handle-errors | |
1857 Set to T for ilisp to handle errors from the underlying lisp. | |
1858 @item ilisp-display-output-function | |
1859 @vindex ilisp-display-output-function | |
1860 The name of a function which displays ILISP output. | |
1861 @item lisp-no-popper | |
1862 @vindex lisp-no-popper | |
1863 Set to T to have all output in inferior LISP | |
1864 @item lisp-show-status | |
1865 @vindex lisp-show-status | |
1866 Set to nil to stop showing process status | |
1867 @item ilisp-prefix-match | |
1868 @vindex ilisp-prefix-match | |
1869 Set to T if you do not want partial completion | |
1870 @item ilisp-filter-regexp | |
1871 @vindex ilisp-filter-regexp | |
1872 Input history filter | |
1873 @item ilisp-filter-length | |
1874 @vindex ilisp-filter-length | |
1875 Input history minimum length | |
1876 @item ilisp-other-prompt | |
1877 @vindex ilisp-other-prompt | |
1878 Prompt for non- top-level read-eval print loops | |
1879 @end table | |
1880 | |
1881 @node Dialects, Concept index, Customization, Top | |
1882 @chapter Dialects | |
1883 @cindex Dialects | |
1884 | |
1885 A @dfn{dialect} of lisp is a specific implementation. For the parts of | |
1886 Common Lisp which are well specified, they are usually the same. For | |
1887 the parts that are not (debugger, top-level loop, etc.), there is | |
1888 usually the same functionality but different commands. | |
1889 | |
1890 ILISP provides the means to specify these differences so that the ILISP | |
1891 commands will use the specific command peculiar to an implementation, | |
1892 but still offer the same behavior with the same interface. | |
1893 | |
1894 | |
1895 @menu | |
1896 * Defining new dialects:: | |
1897 * Writing new commands:: | |
1898 @end menu | |
1899 | |
1900 @node Defining new dialects, Writing new commands, , Dialects | |
1901 @section Defining new dialects | |
1902 | |
1903 | |
1904 To define a new dialect use the macro @code{defdialect}. For examples, | |
1905 look at the dialect definitions in @file{ilisp-acl.el}, | |
1906 @file{ilisp-cmu.el}, @file{ilisp-kcl.el}, @file{ilisp-luc}. There are | |
1907 hooks and variables for almost anything that you are likely to need to | |
1908 change. The relationship between dialects is hierarchical with the root | |
1909 values being defined in @code{setup-ilisp}. For a new dialect, you only | |
1910 need to change the variables that are different than in the parent | |
1911 dialect. | |
1912 @cindex Defining new dialects | |
1913 @pindex setup-ilisp | |
1914 @pindex defdialect | |
1915 | |
1916 | |
1917 @node Writing new commands, , Defining new dialects, Dialects | |
1918 @section Writing new commands | |
1919 @cindex Internal ILISP functions | |
1920 | |
1921 Basic tools for creating new commands: | |
1922 @table @code | |
1923 @item deflocal | |
1924 @findex deflocal | |
1925 Define a new buffer local variable. | |
1926 @item ilisp-dialect | |
1927 @findex ilisp-dialect | |
1928 List of dialect types. For specific dialect clauses. | |
1929 @item lisp-symbol | |
1930 @findex lisp-symbol | |
1931 Create a symbol. | |
1932 @item lisp-symbol-name | |
1933 @findex lisp-symbol-name | |
1934 Return a symbol's name | |
1935 @item lisp-symbol-delimiter | |
1936 @findex lisp-symbol-delimiter | |
1937 Return a symbol's qualification | |
1938 @item lisp-symbol-package | |
1939 @findex lisp-symbol-package | |
1940 Return a symbol's package | |
1941 @item lisp-string-to-symbol | |
1942 @findex lisp-string-to-symbol | |
1943 Convert string to symbol | |
1944 @item lisp-symbol-to-string | |
1945 @findex lisp-symbol-to-string | |
1946 Convert symbol to string | |
1947 @item lisp-buffer-symbol | |
1948 @findex lisp-buffer-symbol | |
1949 Convert symbol to string qualified for buffer | |
1950 @item lisp-previous-symbol | |
1951 @findex lisp-previous-symbol | |
1952 Return previous symbol | |
1953 @item lisp-previous-sexp | |
1954 @findex lisp-previous-sexp | |
1955 Return previous sexp | |
1956 @item lisp-def-name | |
1957 @findex lisp-def-name | |
1958 Return name of current definition | |
1959 @item lisp-function-name | |
1960 @findex lisp-function-name | |
1961 Return previous function symbol | |
1962 @item ilisp-read | |
1963 @findex ilisp-read | |
1964 Read an sexp with completion, arglist, etc | |
1965 @item ilisp-read-symbol | |
1966 @findex ilisp-read-symbol | |
1967 Read a symbol or list with completion | |
1968 @item ilisp-completing-read | |
1969 @findex ilisp-completing-read | |
1970 Read from choices or list with completion | |
1971 @end table | |
1972 | |
1973 @noindent | |
1974 Notes: | |
1975 @itemize @bullet | |
1976 @item | |
1977 Special commands like arglist should use @code{ilisp-send} to send a | |
1978 message to the inferior LISP. | |
1979 @findex ilisp-send | |
1980 | |
1981 @item | |
1982 Eval/compile commands should use @code{eval-region-lisp} or | |
1983 @code{compile-region-lisp}. | |
1984 @findex compile-region-lisp | |
1985 @findex eval-region-lisp | |
1986 | |
1987 @end itemize | |
1988 | |
1989 @node Concept index, Key index, Dialects, Top | |
1990 @unnumbered Concept Index | |
1991 @printindex cp | |
1992 | |
1993 @node Key index, Command index, Concept index, Top | |
1994 @unnumbered Key Index | |
1995 @printindex ky | |
1996 | |
1997 @node Command index, Variable index, Key index, Top | |
1998 @unnumbered Command Index | |
1999 | |
2000 @noindent | |
2001 Commands available via @kbd{M-x} prefix. | |
2002 | |
2003 @printindex pg | |
2004 | |
2005 @node Variable index, Function index, Command index, Top | |
2006 @unnumbered Variable Index | |
2007 | |
2008 @noindent | |
2009 Variables and hooks of ILISP. | |
2010 | |
2011 @printindex vr | |
2012 | |
2013 @node Function index, , Variable index, Top | |
2014 @unnumbered Function Index | |
2015 | |
2016 @noindent | |
2017 Internal functions of ILISP which can be used to write new commands. | |
2018 | |
2019 @printindex fn | |
2020 | |
2021 @contents | |
2022 | |
2023 @bye | |
2024 | |
2025 | |
2026 Should this stuff go anywhere?? | |
2027 | |
2028 misc ILISP | |
2029 bol-ilisp (C-a) will go after the prompt as defined by | |
2030 comint-prompt-regexp or ilisp-other-prompt or to the left margin with | |
2031 a prefix. | |
2032 | |
2033 misc | |
2034 backward-delete-char-untabify (DEL) | |
2035 converts tabs to spaces as it moves back. | |
2036 | |
2037 | |
2038 about cmds | |
2039 The very first inferior LISP command executed may send some forms to | |
2040 initialize the inferior LISP. | |
2041 | |
2042 Each time an inferior LISP command is executed, the last form sent can be | |
2043 seen in the *ilisp-send* buffer. | |
2044 | |
2045 | |
2046 @comment Local variables: | |
2047 @comment version-control: t | |
2048 @comment End: |