1\input texinfo
2@c %**start of header
3@setfilename slime.info
4
5@documentencoding UTF-8
6@codequoteundirected on
7@codequotebacktick on
8
9@dircategory Emacs
10@direntry
11* SLIME: (slime).    Superior Lisp Interaction Mode for Emacs.
12@end direntry
13@c %**end of header
14
15@set EDITION 2.24
16@set UPDATED @today{}
17@set TITLE SLIME User Manual
18@settitle @value{TITLE}, version @value{EDITION}
19
20@copying
21Written by Luke Gorrie and others.
22
23This file has been placed in the public domain.
24@end copying
25
26@titlepage
27@title @value{TITLE}
28@titlefont{version @value{EDITION}}
29@sp 2
30@center @image{slime-small}
31@sp 4
32@subtitle Compiled: @value{UPDATED}
33
34@page
35@insertcopying
36
37@end titlepage
38
39@c Macros
40
41@macro SLIME
42@acronym{SLIME}
43@end macro
44
45@macro SLDB
46@acronym{SLDB}
47@end macro
48
49@macro REPL
50@acronym{REPL}
51@end macro
52
53@macro Git
54@acronym{Git}
55@end macro
56
57@macro kbditem{key, command}
58@item \key\
59@itemx M-x \command\
60@kindex \key\
61@findex \command\
62@c
63@end macro
64
65@macro kbditempair{key1, key2, command1, command2}
66@item \key1\, M-x \command1\
67@itemx \key2\, M-x \command2\
68@kindex \key1\
69@kindex \key2\
70@findex \command1\
71@findex \command2\
72@c
73@end macro
74
75@macro cmditem{command}
76@item M-x \command\
77@findex \command\
78@c
79@end macro
80
81@macro kbdanchorc{key, command, comment}
82@anchor{\command\}
83@item \key\
84@code{\command\}
85@i{\comment\}@*
86@end macro
87
88@macro fcnindex{name}
89@item \name\
90@xref{\name\}.
91@end macro
92
93@c Merge the variable and concept indices because both are rather short
94@synindex cp vr
95
96
97@c @setchapternewpage off
98@c @shortcontents
99@contents
100
101@ifnottex
102@node Top
103@top SLIME
104
105@SLIME{} is the ``Superior Lisp Interaction Mode for Emacs''. This is
106the manual for version @value{EDITION}. (Last updated @value{UPDATED})
107
108@insertcopying
109@end ifnottex
110
111@menu
112* Introduction::
113* Getting started::
114* SLIME mode::
115* Debugger::
116* Misc::
117* Customization::
118* Tips and Tricks::
119* Contributed Packages::
120* Credits::
121* Key Index::
122* Command Index::
123* Variable Index::
124
125@detailmenu
126 --- The Detailed Node Listing ---
127
128Getting started
129
130* Platforms::
131* Downloading::
132* Installation::
133* Running::
134* Setup Tuning::
135
136Downloading @SLIME{}
137
138* Git::
139* Git Incantations::
140
141Setup Tuning
142
143* Basic customization::
144* Multiple Lisps::
145* Loading Swank faster::
146
147Using @SLIME{} mode
148
149* User-interface conventions::
150* Evaluation::
151* Compilation::
152* Completion::
153* Finding definitions::
154* Documentation::
155* Cross-reference::
156* Macro-expansion::
157* Disassembly::
158* Recovery::
159* Inspector::
160* Profiling::
161* Other::
162* Semantic indentation::
163* Reader conditionals::
164
165User-interface conventions
166
167* Temporary buffers::
168* Inferior-lisp::
169* Multithreading::
170* Key bindings::
171
172SLDB: the @SLIME{} debugger
173
174* Examining frames::
175* Restarts::
176* Frame Navigation::
177* Stepping::
178* Miscellaneous::
179
180Misc
181
182* slime-selector::
183* slime-macroexpansion-minor-mode::
184* Multiple connections::
185
186Customization
187
188* Emacs-side customization::
189* Lisp-side::
190
191Emacs-side
192
193* Hooks::
194
195Lisp-side (Swank)
196
197* Communication style::
198* Other configurables::
199
200Tips and Tricks
201
202* Connecting to a remote lisp::
203* Global IO Redirection::
204* Auto-SLIME::
205
206Connecting to a remote lisp
207
208* Setting up the lisp image::
209* Setting up Emacs::
210* Setting up pathname translations::
211
212Contributed Packages
213
214* Loading Contribs::
215* REPL::
216* slime-mrepl::
217* inferior-slime-mode::
218* Compound Completion::
219* Fuzzy Completion::
220* slime-autodoc-mode::
221* ASDF::
222* Banner::
223* Editing Commands::
224* Fancy Inspector::
225* Presentations::
226* Typeout frames::
227* TRAMP::
228* Documentation Links::
229* Xref and Class Browser::
230* Highlight Edits::
231* Scratch Buffer::
232* SLIME Trace Dialog::
233* slime-sprof::
234* slime-fancy::
235* Quicklisp::
236
237REPL: the ``top level''
238
239* REPL commands::
240* Input Navigation::
241* Shortcuts::
242
243@end detailmenu
244@end menu
245
246@c -----------------------
247@node Introduction
248@chapter Introduction
249
250@SLIME{} is the ``Superior Lisp Interaction Mode for Emacs.''
251
252@SLIME{} extends Emacs with support for interactive programming in
253Common Lisp. The features are centered around @code{slime-mode}, an
254Emacs minor-mode that complements the standard @code{lisp-mode}. While
255@code{lisp-mode} supports editing Lisp source files, @code{slime-mode}
256adds support for interacting with a running Common Lisp process for
257compilation, debugging, documentation lookup, and so on.
258
259The @code{slime-mode} programming environment follows the example of
260Emacs's native Emacs Lisp environment. We have also included good
261ideas from similar systems (such as @acronym{ILISP}) and some new
262ideas of our own.
263
264@SLIME{} is constructed from two parts: a user-interface written in
265Emacs Lisp, and a supporting server program written in Common
266Lisp. The two sides are connected together with a socket and
267communicate using an @acronym{RPC}-like protocol.
268
269The Lisp server is primarily written in portable Common Lisp. The
270required implementation-specific functionality is specified by a
271well-defined interface and implemented separately for each Lisp
272implementation. This makes @SLIME{} readily portable.
273
274@c -----------------------
275@node Getting started
276@chapter Getting started
277
278This chapter tells you how to get @SLIME{} up and running.
279
280@menu
281* Platforms::
282* Downloading::
283* Installation::
284* Running::
285* Setup Tuning::
286@end menu
287
288@c -----------------------
289@node Platforms
290@section Supported Platforms
291
292@SLIME{} supports a wide range of operating systems and Lisp
293implementations. @SLIME{} runs on Unix systems, Mac OSX, and Microsoft
294Windows. GNU Emacs versions 24 and 23.4 are supported. @emph{XEmacs is
295not supported anymore}.
296
297The supported Lisp implementations, roughly ordered from the
298best-supported, are:
299
300@itemize @bullet
301@item
302CMU Common Lisp (@acronym{CMUCL}), 19d or newer
303@item
304Steel Bank Common Lisp (@acronym{SBCL}), 1.0 or newer
305@item
306Clozure Common Lisp (@acronym{CCL}), version 1.3 or newer
307@item
308LispWorks, version 4.3 or newer
309@item
310Allegro Common Lisp (@acronym{ACL}), version 6 or newer
311@item
312@acronym{CLISP}, version 2.35 or newer
313@item
314Armed Bear Common Lisp (@acronym{ABCL})
315@item
316Corman Common Lisp, version 2.51 or newer with the
317patches from @url{http://www.grumblesmurf.org/lisp/corman-patches})
318@item
319Scieneer Common Lisp (@acronym{SCL}), version 1.2.7 or newer
320@item
321Embedded Common Lisp (@acronym{ECL})
322@end itemize
323
324Most features work uniformly across implementations, but some are
325prone to variation. These include the precision of placing
326compiler-note annotations, @acronym{XREF} support, and fancy debugger
327commands (like ``restart frame'').
328
329@c -----------------------
330@node Downloading
331@section Downloading SLIME
332
333You can choose between using a released version of @SLIME{} or
334accessing our @Git{} repository directly. You can download the latest
335released version from our website:
336
337@url{http://github.com/slime/slime/}
338
339We recommend that users who participate in the @code{slime-devel}
340mailing list use the @Git{} version of the code.
341
342@menu
343* Git::
344* Git Incantations::
345@end menu
346
347@c -----------------------
348@node Git
349@subsection Downloading from Git
350
351@SLIME{} is available from the @Git{} repository on
352@file{github.com}. You have the option to use either the very latest
353code or the tagged @code{FAIRLY-STABLE} snapshot.
354
355The latest version tends to have more features and fewer bugs than the
356@code{FAIRLY-STABLE} version, but it can be unstable during times of
357major surgery. As a rule-of-thumb recommendation we suggest that if
358you follow the @code{slime-devel} mailing list then you're better off
359with the latest version (we'll send a note when it's undergoing major
360hacking). If you don't follow the mailing list you won't know the
361status of the latest code, so tracking @code{FAIRLY-STABLE} or using a
362released version is the safe option.
363
364If you download from @Git{} then remember to @code{git pull}
365occasionally.  Improvements are continually being committed, and the
366@code{FAIRLY-STABLE} tag is moved forward from time to time.
367
368@c -----------------------
369@node Git Incantations
370@subsection Git incantations
371
372To download the very latest @SLIME{} you first configure
373your @code{GitROOT} and login to the repository.
374
375@example
376git clone https://github.com/slime/slime.git
377@end example
378
379You might substitute @code{https} for @code{http} if you're having
380problems with that protocol.
381
382If you want to hack on @SLIME{}, use Github's @emph{fork} functionality
383and submit a @emph{pull request}. Be sure to first read the
384@uref{https://github.com/slime/slime/blob/master/CONTRIBUTING.md,,CONTRIBUTING.md} file first.
385
386
387@c -----------------------
388@node Installation
389@section Installation
390
391The easiest way to install and keep @SLIME{} up-to-date is using
392Emacs's built-in package manager. @SLIME{} is available from the
393@uref{http://melpa.org,,MELPA} repository. After
394@uref{http://melpa.org/#/getting-started,,setting up the MELPA repository},
395@SLIME{} can be installed via @kbd{M-x package-install RET slime RET}.
396You should then define your default Lisp in your @file{.emacs} as follows:
397
398@example
399(setq inferior-lisp-program "/opt/sbcl/bin/sbcl")
400@end example
401
402At this point, you should be ready to start @ref{Running,,running SLIME}.
403
404This is the minimal configuration with the fewest frills.  If the
405basic setup is working, you can try additional modules (@ref{Loading
406Contribs}).
407
408@subsection Installing from Git
409
410If you'd rather install @SLIME{} directly from its
411@uref{https://github.com/slime/slime,,git repository}, you will need
412to add a few extra lines in your @file{.emacs}:
413
414@vindex inferior-lisp-program
415@vindex load-path
416@example
417;; @emph{Setup load-path, autoloads and your lisp system}
418;; @emph{Not needed if you install SLIME via MELPA}
419(add-to-list 'load-path "~/dir/to/cloned/slime")
420(require 'slime-autoloads)
421(setq inferior-lisp-program "/opt/sbcl/bin/sbcl")
422@end example
423
424You may optionally byte-compile @SLIME{} using @code{make compile
425contrib-compile}.
426
427
428@c -----------------------
429@node Running
430@section Running SLIME
431
432@SLIME{} is started with the Emacs command @kbd{M-x slime}. This uses
433the @code{inferior-lisp} package to start a Lisp process, loads and
434starts the Lisp-side server (known as ``Swank''), and establishes a
435socket connection between Emacs and Lisp. Finally a @REPL{} buffer is
436created where you can enter Lisp expressions for evaluation.
437
438At this point @SLIME{} is up and running and you can start exploring.
439
440@node Setup Tuning
441@section Setup Tuning
442
443This section explains ways to perform basic extensions to @SLIME{}, and
444how to configure @SLIME{} for multiple Lisp systems and how to reduce
445@SLIME{}'s startup time.
446
447Please proceed with this section only if your basic setup works.  If
448you are happy with the basic setup, skip this section.
449
450For contrib modules @pxref{Loading Contribs}.
451
452@menu
453* Basic customization::
454* Multiple Lisps::
455* Loading Swank faster::
456@end menu
457
458@node Basic customization
459@subsection Basic customization
460
461Once you have the basic no-frills setup working, you can enhance your
462@SLIME{} installation with bundled extensions:
463
464@example
465;; @emph{Setup load-path, autoloads and your lisp system}
466(add-to-list 'load-path "~/dir/to/cloned/slime")
467(require 'slime-autoloads)
468@end example
469
470See @pxref{Loading Contribs} for more information on @SLIME{}'s
471contrib system.
472
473To customize a particular binding in one of @SLIME{}'s keymaps, you
474can add one of the following to your init file:
475
476@example
477(add-hook 'slime-load-hook
478  (lambda ()
479     (define-key slime-prefix-map (kbd "M-h") 'slime-documentation-lookup)))
480@end example
481
482The former technique works only for @SLIME{}'s core keymaps, not it's
483contribs'. For those you can use the latter form which works for any
484Emacs library. See also @pxref{Customization} for more advanced
485configuration options.
486
487@node Multiple Lisps
488@subsection Multiple Lisps
489
490By default, the command @kbd{M-x slime} starts the program specified
491with @code{inferior-lisp-program}.  If you invoke @kbd{M-x slime} with
492a prefix argument, Emacs prompts for the program which should be
493started instead.  If you need that frequently or if the command
494involves long filenames it's more convenient to set the
495@code{slime-lisp-implementations} variable in your @file{.emacs}.  For
496example here we define two programs:
497
498@vindex slime-lisp-implementations
499@lisp
500(setq slime-lisp-implementations
501      '((cmucl ("cmucl" "-quiet"))
502        (sbcl ("/opt/sbcl/bin/sbcl") :coding-system utf-8-unix)))
503@end lisp
504
505@vindex slime-default-lisp
506This variable holds a list of programs and if you invoke @SLIME{} with
507a negative prefix argument, @kbd{M-- M-x slime}, you can select a
508program from that list. When called without a prefix, either the name
509specified in @code{slime-default-lisp}, or the first item of the list will be used.
510The elements of the list should look like
511
512@lisp
513(NAME (PROGRAM PROGRAM-ARGS...) &key CODING-SYSTEM INIT INIT-FUNCTION ENV)
514@end lisp
515
516@table @code
517@item NAME
518is a symbol and is used to identify the program.
519@item PROGRAM
520is the filename of the program.  Note that the filename can contain
521spaces.
522@item PROGRAM-ARGS
523is a list of command line arguments.
524@item CODING-SYSTEM
525the coding system for the connection.  (@pxref{slime-net-coding-system})x
526@item INIT
527should be a function which takes two arguments: a filename and a
528character encoding.  The function should return a Lisp expression as a
529string which instructs Lisp to start the Swank server and to write the
530port number to the file.  At startup, @SLIME{} starts the Lisp process
531and sends the result of this function to Lisp's standard input.  As
532default, @code{slime-init-command} is used.  An example is shown in
533@ref{init-example,,Loading Swank faster}.
534@item INIT-FUNCTION
535should be a function which takes no arguments.  It is called after
536the connection is established. (See also @ref{slime-connected-hook}.)
537@item ENV
538specifies a list of environment variables for the subprocess. E.g.
539@lisp
540(sbcl-cvs ("/home/me/sbcl-cvs/src/runtime/sbcl"
541           "--core" "/home/me/sbcl-cvs/output/sbcl.core")
542          :env ("SBCL_HOME=/home/me/sbcl-cvs/contrib/"))
543@end lisp
544initializes @code{SBCL_HOME} in the subprocess.
545@end table
546
547@node Loading Swank faster
548@subsection Loading Swank faster
549
550For SBCL, we recommend that you create a custom core file with socket
551support and @acronym{POSIX} bindings included because those modules
552take the most time to load.  To create such a core, execute the
553following steps:
554
555@example
556shell$ sbcl
557* (mapc 'require '(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 asdf))
558* (save-lisp-and-die "sbcl.core-for-slime")
559@end example
560
561After that, add something like this to your @file{.emacs}:
562
563@lisp
564(setq slime-lisp-implementations
565      '((sbcl ("sbcl" "--core" "sbcl.core-for-slime"))))
566@end lisp
567
568For maximum startup speed you can include the Swank server directly in
569a core file.  The disadvantage of this approach is that the setup is a
570bit more involved and that you need to create a new core file when you
571want to update @SLIME{} or @acronym{SBCL}.  The steps to execute are:
572
573@example
574shell$ sbcl
575* (load ".../slime/swank-loader.lisp")
576* (swank-loader:dump-image "sbcl.core-with-swank")
577@end example
578
579@noindent
580Then add this to your @file{.emacs}:
581
582@anchor{init-example}
583@lisp
584(setq slime-lisp-implementations
585      '((sbcl ("sbcl" "--core" "sbcl.core-with-swank")
586              :init (lambda (port-file _)
587                      (format "(swank:start-server %S)\n" port-file)))))
588@end lisp
589
590@noindent
591Similar setups should also work for other Lisp implementations.
592
593@node SLIME mode
594@chapter Using Slime mode
595
596@SLIME{}'s commands are provided via @code{slime-mode}, a minor-mode
597used in conjunction with Emacs's @code{lisp-mode}. This chapter
598describes the @code{slime-mode} and its relatives.
599
600@menu
601* User-interface conventions::
602* Evaluation::
603* Compilation::
604* Completion::
605* Finding definitions::
606* Documentation::
607* Cross-reference::
608* Macro-expansion::
609* Disassembly::
610* Recovery::
611* Inspector::
612* Profiling::
613* Other::
614* Semantic indentation::
615* Reader conditionals::
616@end menu
617
618@c -----------------------
619@node User-interface conventions
620@section User-interface conventions
621
622To use @SLIME{} comfortably it is important to understand a few
623``global'' user-interface characteristics. The most important
624principles are described in this section.
625
626@menu
627* Temporary buffers::
628* Inferior-lisp::
629* Multithreading::
630* Key bindings::
631@end menu
632
633@c -----------------------
634@node Temporary buffers
635@subsection Temporary buffers
636
637Some @SLIME{} commands create temporary buffers to display their
638results. Although these buffers usually have their own special-purpose
639major-modes, certain conventions are observed throughout.
640
641Temporary buffers can be dismissed by pressing @kbd{q}. This kills the
642buffer and restores the window configuration as it was before the
643buffer was displayed. Temporary buffers can also be killed with the
644usual commands like @code{kill-buffer}, in which case the previous
645window configuration won't be restored.
646
647Pressing @kbd{RET} is supposed to ``do the most obvious useful
648thing.'' For instance, in an apropos buffer this prints a full
649description of the symbol at point, and in an @acronym{XREF} buffer it
650displays the source code for the reference at point. This convention
651is inherited from Emacs's own buffers for apropos listings,
652compilation results, etc.
653
654Temporary buffers containing Lisp symbols use @code{slime-mode} in
655addition to any special mode of their own. This makes the usual
656@SLIME{} commands available for describing symbols, looking up
657function definitions, and so on.
658
659@vindex slime-description-autofocus
660Initial focus of those ``description'' buffers depends on the variable
661@code{slime-description-autofocus}. If @code{nil} (the default),
662description buffers do not receive focus automatically, and vice
663versa.
664
665@c -----------------------
666@node Inferior-lisp
667@subsection @code{*inferior-lisp*} buffer
668
669@SLIME{} internally uses the @code{comint} package to start Lisp
670processes. This has a few user-visible consequences, some good and
671some not-so-terribly. To avoid confusion it is useful to understand
672the interactions.
673
674The buffer @code{*inferior-lisp*} contains the Lisp process's own
675top-level. This direct access to Lisp is useful for troubleshooting,
676and some degree of @SLIME{} integration is available using the
677inferior-slime-mode.  Many people load the better integrated @SLIME{}
678@REPL{} contrib module (@pxref{REPL}) and ignore
679the @code{*inferior-lisp*} buffer.  (@pxref{Loading Contribs} for
680information on how to enable the REPL.)
681
682@c -----------------------
683@node Multithreading
684@subsection Multithreading
685
686If the Lisp system supports multithreading, SLIME spawns a new thread
687for each request, e.g., @kbd{C-x C-e} creates a new thread to evaluate
688the expression.  An exception to this rule are requests from the
689@REPL{}: all commands entered in the @REPL{} buffer are evaluated in a
690dedicated @REPL{} thread.
691
692Some complications arise with multithreading and special variables.
693Non-global special bindings are thread-local, e.g., changing the value
694of a let bound special variable in one thread has no effect on the
695binding of the variables with the same name in other threads.  This
696makes it sometimes difficult to change the printer or reader behaviour
697for new threads.  The variable
698@code{swank:*default-worker-thread-bindings*} was introduced for such
699situations: instead of modifying the global value of a variable, add a
700binding the @code{swank:*default-worker-thread-bindings*}.  E.g., with
701the following code, new threads will read floating point values as
702doubles by default:
703
704@example
705(push '(*read-default-float-format* . double-float)
706       swank:*default-worker-thread-bindings*).
707@end example
708
709
710@node Key bindings
711@subsection Key bindings
712
713In general we try to make our key bindings fit with the overall Emacs
714style. We also have the following somewhat unusual convention of our
715own: when entering a three-key sequence, the final key can be pressed
716either with control or unmodified. For example, the
717@code{slime-describe-symbol} command is bound to @kbd{C-c C-d d}, but
718it also works to type @kbd{C-c C-d C-d}. We're simply binding both key
719sequences because some people like to hold control for all three keys
720and others don't, and with the two-key prefix we're not afraid of
721running out of keys.
722
723There is one exception to this rule, just to trip you up. We never
724bind @kbd{C-h} anywhere in a key sequence, so @kbd{C-c C-d C-h}
725doesn't do the same thing as @kbd{C-c C-d h}. This is because Emacs
726has a built-in default so that typing a prefix followed by @kbd{C-h}
727will display all bindings starting with that prefix, so @kbd{C-c C-d
728C-h} will actually list the bindings for all documentation commands.
729This feature is just a bit too useful to clobber!
730
731@quotation
732@i{``Are you deliberately spiting Emacs's brilliant online help facilities? The gods will be angry!''}
733@end quotation
734
735@noindent This is a brilliant piece of advice. The Emacs online help facilities
736are your most immediate, up-to-date and complete resource for keybinding
737information. They are your friends:
738
739@table @kbd
740@kbdanchorc{C-h k <key>, describe-key, ``What does this key do?''}
741Describes current function bound to @kbd{<key>} for focus buffer.
742
743@kbdanchorc{C-h b, describe-bindings, ``Exactly what bindings are available?''}
744Lists the current key-bindings for the focus buffer.
745
746@kbdanchorc{C-h m, describe-mode, ``Tell me all about this mode''}
747Shows all the available major mode keys, then the minor mode keys, for
748the modes of the focus buffer.
749
750@kbdanchorc{C-h l, view-lossage, ``Woah@comma{} what key chord did I just do?''}
751Shows you the literal sequence of keys you've pressed in order.
752
753@c <key> is breaks links PDF, despite that it's not l it's C-h
754@c @kbdanchorc{ <key> l, , ``What starts with?''}
755@c Lists all keybindings that begin with @code{<key>} for the focus buffer mode.
756
757
758@end table
759
760@emph{Note:} In this documentation the designation @kbd{C-h} is a
761@dfn{canonical key} which might actually mean Ctrl-h, or F1, or
762whatever you have @code{help-command} bound to in your
763@code{.emacs}. Here is a common situation:
764
765@example
766(global-set-key [f1]   'help-command)
767(global-set-key "\C-h" 'delete-backward-char)
768@end example
769
770@noindent In this situation everywhere you see @kbd{C-h} in the
771documentation you would substitute @kbd{F1}.
772
773You can assign or change default key bindings globally using the
774@code{global-set-key} function in your @file{~/.emacs} file like this:
775@example
776(global-set-key "\C-c s" 'slime-selector)
777@end example
778@noindent
779which binds @kbd{C-c s} to the function @code{slime-selector}.
780
781Alternatively, if you want to assign or change a key binding in just a
782particular slime mode, you can use the @code{define-key} function
783in your @file{~/.emacs} file like this:
784@example
785(define-key slime-repl-mode-map (kbd "C-c ;")
786            'slime-insert-balanced-comments)
787@end example
788@noindent
789which binds @kbd{C-c ;} to the function
790@code{slime-insert-balanced-comments} in the REPL buffer.
791
792@c -----------------------
793@node Evaluation
794@section Evaluation commands
795
796These commands each evaluate a Common Lisp expression in a different
797way.  Usually they mimic commands for evaluating Emacs Lisp code.  By
798default they show their results in the echo area, but a prefix
799argument causes the results to be inserted in the current buffer.
800
801@table @kbd
802
803@kbditem{C-x C-e, slime-eval-last-expression}
804
805Evaluate the expression before point and show the result in the echo
806area.
807
808@kbditem{C-M-x, slime-eval-defun}
809Evaluate the current toplevel form and show the result in the echo
810area.  `C-M-x' treats `defvar' expressions specially.  Normally,
811evaluating a `defvar' expression does nothing if the variable it
812defines already has a value.  But `C-M-x' unconditionally resets the
813variable to the initial value specified in the `defvar' expression.
814This special feature is convenient for debugging Lisp programs.
815
816@end table
817
818If @kbd{C-M-x} or @kbd{C-x C-e} is given a numeric argument, it
819inserts the value into the current buffer, rather than displaying it
820in the echo area.
821
822@table @kbd
823@kbditem{C-c :, slime-interactive-eval}
824Evaluate an expression read from the minibuffer.
825
826@kbditem{C-c C-r, slime-eval-region}
827Evaluate the region.
828
829@kbditem{C-c C-p, slime-pprint-eval-last-expression}
830Evaluate the expression before point and pretty-print the result in a
831fresh buffer.
832
833@kbditem{C-c E, slime-edit-value}
834Edit the value of a setf-able form in a new buffer @file{*Edit <form>*}.
835The value is inserted into a temporary buffer for editing and then set
836in Lisp when committed with @kbd{C-c C-c}.
837
838@kbditem{C-c C-u, slime-undefine-function}
839Undefine the function, with @code{fmakunbound}, for the symbol at
840point.
841
842@end table
843
844@c -----------------------
845@node Compilation
846@section Compilation commands
847
848@cindex Compilation
849
850@SLIME{} has fancy commands for compiling functions, files, and
851packages. The fancy part is that notes and warnings offered by the
852Lisp compiler are intercepted and annotated directly onto the
853corresponding expressions in the Lisp source buffer. (Give it a try to
854see what this means.)
855
856@table @kbd
857@cindex Compiling Functions
858@kbditem{C-c C-c, slime-compile-defun}
859Compile the top-level form at point.  The region blinks shortly to
860give some feedback which part was chosen.
861
862With (positive) prefix argument the form is compiled with maximal
863debug settings (@kbd{C-u C-c C-c}). With negative prefix argument it is compiled for
864speed (@kbd{M-- C-c C-c}). If a numeric argument is passed set debug or speed settings
865to it depending on its sign.
866
867The code for the region is executed after compilation.  In principle,
868the command writes the region to a file, compiles that file, and loads
869the resulting code.
870
871@kbditem{C-c C-k, slime-compile-and-load-file}
872Compile and load the current buffer's source file.  If the compilation
873step fails, the file is not loaded.  It's not always easy to tell
874whether the compilation failed: occasionally you may end up in the
875debugger during the load step.
876
877With (positive) prefix argument the file is compiled with maximal
878debug settings (@kbd{C-u C-c C-k}). With negative prefix argument it is compiled for
879speed (@kbd{M-- C-c C-k}). If a numeric argument is passed set debug or speed settings
880to it depending on its sign.
881
882@kbditem{C-c M-k, slime-compile-file}
883Compile (but don't load) the current buffer's source file.
884
885@kbditem{C-c C-l, slime-load-file}
886Load a Lisp file.  This command uses the Common Lisp LOAD function.
887
888@cmditem{slime-compile-region}
889Compile the selected region.
890
891@end table
892
893The annotations are indicated as underlining on source forms. The
894compiler message associated with an annotation can be read either by
895placing the mouse over the text or with the selection commands below.
896
897@table @kbd
898@kbditem{M-n, slime-next-note}
899Move the point to the next compiler note and displays the note.
900
901@kbditem{M-p, slime-previous-note}
902Move the point to the previous compiler note and displays the note.
903
904@kbditem{C-c M-c, slime-remove-notes}
905Remove all annotations from the buffer.
906
907@kbditem{C-x `, next-error}
908Visit the next-error message.  This is not actually a @SLIME{} command
909but @SLIME{} creates a hidden buffer so that most of the Compilation
910mode commands (@inforef{Compilation Mode,, emacs}) work similarly for
911Lisp as for batch compilers.
912
913@end table
914
915@node Completion
916@section Completion commands
917
918@cindex Completion
919@cindex Symbol Completion
920
921Completion commands are used to complete a symbol or form based on
922what is already present at point. Classical completion assumes an
923exact prefix and gives choices only where branches may occur. Fuzzy
924completion tries harder.
925
926@table @kbd
927@kbditem{M-TAB,slime-complete-symbol}
928@c @itemx ESC TAB
929@c @itemx C-M-i
930Complete the symbol at point. Note that three styles of completion are
931available in @SLIME{}; the default is similar to normal Emacs
932completion (@pxref{slime-completion-at-point-functions}).
933
934@end table
935
936@c -----------------------
937@node Finding definitions
938@section Finding definitions (``Meta-Point'' commands).
939
940@cindex Meta-dot
941@cindex TAGS
942
943The familiar @kbd{M-.} command is provided. For generic functions this
944command finds all methods, and with some systems it does other fancy
945things (like tracing structure accessors to their @code{DEFSTRUCT}
946definition).
947
948@table @kbd
949
950@kbditem{M-., slime-edit-definition}
951Go to the definition of the symbol at point.
952
953@item M-,
954@itemx M-*
955@itemx M-x slime-pop-find-definition-stack
956@kindex M-,
957@findex slime-pop-find-definition-stack
958Go back to the point where @kbd{M-.} was invoked. This gives multi-level
959backtracking when @kbd{M-.} has been used several times.
960
961@kbditem{C-x 4 ., slime-edit-definition-other-window}
962Like @code{slime-edit-definition} but switches to the other window to
963edit the definition in.
964
965@kbditem{C-x 5 ., slime-edit-definition-other-frame}
966Like @code{slime-edit-definition} but opens another frame to edit the
967definition in.
968
969@cmditem{slime-edit-definition-with-etags}
970Use an ETAGS table to find definition at point.
971
972@end table
973
974@c -----------------------
975@node Documentation
976@section Documentation commands
977
978@SLIME{}'s online documentation commands follow the example of Emacs
979Lisp. The commands all share the common prefix @kbd{C-c C-d} and allow
980the final key to be modified or unmodified (@pxref{Key bindings}.)
981
982@table @kbd
983
984@kbditem{SPC, slime-space}
985The space key inserts a space, but also looks up and displays the
986argument list for the function at point, if there is one.
987
988@kbditem{C-c C-d d, slime-describe-symbol}
989Describe the symbol at point.
990
991@kbditem{C-c C-d f, slime-describe-function}
992Describe the function at point.
993
994@kbditem{C-c C-d A, slime-apropos}
995Perform an apropos search on Lisp symbol names for a regular expression
996match and display their documentation strings. By default the external
997symbols of all packages are searched. With a prefix argument you can choose a
998specific package and whether to include unexported symbols.
999
1000@kbditem{C-c C-d z, slime-apropos-all}
1001Like @code{slime-apropos} but also includes internal symbols by default.
1002
1003@kbditem{C-c C-d p, slime-apropos-package}
1004Show apropos results of all symbols in a package. This command is for
1005browsing a package at a high-level. With package-name completion it
1006also serves as a rudimentary Smalltalk-ish image-browser.
1007
1008@kbditem{C-c C-d h, slime-hyperspec-lookup}
1009Lookup the symbol at point in the @cite{Common Lisp Hyperspec}. This
1010uses the familiar @file{hyperspec.el} to show the appropriate section
1011in a web browser. The Hyperspec is found either on the Web or in
1012@code{common-lisp-hyperspec-root}, and the browser is selected by
1013@code{browse-url-browser-function}.
1014
1015Note: this is one case where @kbd{C-c C-d h} is @emph{not} the same as
1016@kbd{C-c C-d C-h}.
1017
1018@kbditem{C-c C-d ~, hyperspec-lookup-format}
1019Lookup a @emph{format character} in the @cite{Common Lisp Hyperspec}.
1020
1021@kbditem{C-c C-d #, hyperspec-lookup-reader-macro}
1022Lookup a @emph{reader macro} in the @cite{Common Lisp Hyperspec}.
1023@end table
1024
1025@c -----------------------
1026@node Cross-reference
1027@section Cross-reference commands
1028
1029@cindex xref
1030@cindex Cross-referencing
1031
1032@SLIME{}'s cross-reference commands are based on the support provided
1033by the Lisp system, which varies widely between Lisps. For systems
1034with no built-in @acronym{XREF} support @SLIME{} queries a portable
1035@acronym{XREF} package, which is taken from the @cite{CMU AI
1036Repository} and bundled with @SLIME{}.
1037
1038Each command operates on the symbol at point, or prompts if there is
1039none. With a prefix argument they always prompt. You can either enter
1040the key bindings as shown here or with the control modified on the
1041last key, @xref{Key bindings}.
1042
1043@menu
1044* Xref buffer commands::
1045@end menu
1046
1047@table @kbd
1048@kbditem{C-c C-w c, slime-who-calls}
1049Show function callers.
1050
1051@kbditem{C-c C-w w, slime-calls-who}
1052Show all known callees.
1053
1054@kbditem{C-c C-w r, slime-who-references}
1055Show references to global variable.
1056
1057@kbditem{C-c C-w b, slime-who-binds}
1058Show bindings of a global variable.
1059
1060@kbditem{C-c C-w s, slime-who-sets}
1061Show assignments to a global variable.
1062
1063@kbditem{C-c C-w m, slime-who-macroexpands}
1064Show expansions of a macro.
1065
1066@cmditem{slime-who-specializes}
1067Show all known methods specialized on a class.
1068
1069@end table
1070
1071There are also ``List callers/callees'' commands. These operate by
1072rummaging through function objects on the heap at a low-level to
1073discover the call graph. They are only available with some Lisp
1074systems, and are most useful as a fallback when precise @acronym{XREF}
1075information is unavailable.
1076
1077@table @kbd
1078@kbditem{C-c <, slime-list-callers}
1079List callers of a function.
1080
1081@kbditem{C-c >, slime-list-callees}
1082List callees of a function.
1083
1084@end table
1085
1086@node Xref buffer commands
1087@subsection Xref buffer commands
1088Commands available in Xref buffers
1089@table @kbd
1090
1091@kbditem{RET, slime-show-xref}
1092Show definition at point in the other window. Do not leave Xref buffer.
1093
1094@kbditem{Space, slime-goto-xref}
1095Show definition at point in the other window and close Xref buffer.
1096
1097@kbditem{C-c C-c, slime-recompile-xref}
1098Recompile definition at point.
1099
1100@kbditem{C-c C-k, slime-recompile-all-xrefs}
1101Recompile all definitions.
1102
1103@end table
1104
1105@c -----------------------
1106@node Macro-expansion
1107@section Macro-expansion commands
1108
1109@cindex Macros
1110
1111@table @kbd
1112@kbditem{C-c C-m, slime-expand-1}
1113Macroexpand (or compiler-macroexpand) the expression starting at point
1114once.  If invoked with a prefix argument use macroexpand instead or
1115macroexpand-1 (or compiler-macroexpand instead of
1116compiler-macroexpand-1).
1117
1118@cmditem{slime-macroexpand-1}
1119Macroexpand the expression starting at point once.  If invoked with a
1120prefix argument, use macroexpand instead of macroexpand-1.
1121
1122@kbditem{C-c M-m, slime-macroexpand-all}
1123Fully macroexpand the expression starting at point.
1124
1125@cmditem{slime-compiler-macroexpand-1}
1126Display the compiler-macro expansion of sexp starting at point.
1127
1128@cmditem{slime-compiler-macroexpand}
1129Repeatedly expand compiler macros of sexp starting at point.
1130
1131@end table
1132
1133For additional minor-mode commands and discussion,
1134@pxref{slime-macroexpansion-minor-mode}.
1135
1136
1137@c -----------------------
1138@node Disassembly
1139@section Disassembly commands
1140
1141@table @kbd
1142
1143@kbditem{C-c M-d, slime-disassemble-symbol}
1144Disassemble the function definition of the symbol at point.
1145
1146@kbditem{C-c C-t, slime-toggle-trace-fdefinition}
1147Toggle tracing of the function at point.  If invoked with a prefix
1148argument, read additional information, like which particular method
1149should be traced.
1150
1151@cmditem{slime-untrace-all}
1152Untrace all functions.
1153
1154@end table
1155
1156@c -----------------------
1157@node Recovery
1158@section Abort/Recovery commands
1159
1160@table @kbd
1161@kbditem{C-c C-b, slime-interrupt}
1162Interrupt Lisp (send @code{SIGINT}).
1163
1164@cmditem{slime-restart-inferior-lisp}
1165Restart the @code{inferior-lisp} process.
1166
1167@kbditem{C-c ~, slime-sync-package-and-default-directory}
1168Synchronize the current package and working directory from Emacs to
1169Lisp.
1170
1171@kbditem{C-c M-p, slime-repl-set-package}
1172Set the current package of the @acronym{REPL}.
1173
1174@cmditem{slime-cd}
1175Set the current directory of the Lisp process.  This also
1176changes the current directory of the REPL buffer.
1177
1178@cmditem{slime-pwd}
1179Print the current directory of the Lisp process.
1180
1181@end table
1182
1183@c -----------------------
1184@node Inspector
1185@section Inspector commands
1186
1187The @SLIME{} inspector is a Emacs-based alternative to the
1188standard @code{INSPECT} function. The inspector presents objects in
1189Emacs buffers using a combination of plain text, hyperlinks to related
1190objects.
1191
1192The inspector can easily be specialized for the objects in your own
1193programs. For details see the @code{inspect-for-emacs} generic
1194function in @file{swank/backend.lisp}.
1195
1196@table @kbd
1197
1198@kbditem{C-c I, slime-inspect}
1199Inspect the value of an expression entered in the minibuffer.
1200
1201@end table
1202
1203The standard commands available in the inspector are:
1204
1205@table @kbd
1206
1207@kbditem{RET, slime-inspector-operate-on-point}
1208If point is on a value then recursively call the inspector on that
1209value. If point is on an action then call that action.
1210
1211@kbditem{d, slime-inspector-describe}
1212Describe the slot at point.
1213
1214@kbditem{e, slime-inspector-eval}
1215Evaluate an expression in the context of the inspected object.  The
1216variable @code{*} will be bound to the inspected object.
1217
1218@kbditem{v, slime-inspector-toggle-verbose}
1219Toggle between verbose and terse mode. Default is determined by
1220`swank:*inspector-verbose*'.
1221
1222@kbditem{l, slime-inspector-pop}
1223Go back to the previous object (return from @kbd{RET}).
1224
1225@kbditem{n, slime-inspector-next}
1226The inverse of @kbd{l}. Also bound to @kbd{SPC}.
1227
1228@kbditem{g, slime-inspector-reinspect}
1229Reinspect.
1230
1231@kbditem{q, slime-inspector-quit}
1232Dismiss the inspector buffer.
1233
1234@kbditem{p, slime-inspector-pprint}
1235Pretty print in another buffer object at point.
1236
1237@kbditem{., slime-inspector-show-source}
1238Find source of object at point.
1239
1240@kbditem{>, slime-inspector-fetch-all}
1241Fetch all inspector contents and go to the end.
1242
1243@kbditem{M-RET, slime-inspector-copy-down}
1244Store the value under point in the variable `*'.  This can
1245then be used to access the object in the REPL.
1246
1247@kbditempair{TAB, S-TAB, slime-inspector-next-inspectable-object, slime-inspector-previous-inspectable-object}
1248
1249Jump to the next and previous inspectable object respectively.
1250
1251@end table
1252
1253@c -----------------------
1254@node Profiling
1255@section Profiling commands
1256
1257The profiling commands are based on CMUCL's profiler.  These are
1258simple wrappers around functions which usually print something to the
1259output buffer.
1260
1261@table @kbd
1262@cmditem{slime-toggle-profile-fdefinition}
1263Toggle profiling of a function.
1264@cmditem{slime-profile-package}
1265Profile all functions in a package.
1266@cmditem{slime-profile-by-substring}
1267Profile all functions which names contain a substring.
1268@cmditem{slime-unprofile-all}
1269Unprofile all functions.
1270@cmditem{slime-profile-report}
1271Report profiler data.
1272@cmditem{slime-profile-reset}
1273Reset profiler data.
1274@cmditem{slime-profiled-functions}
1275Show list of currently profiled functions.
1276@end table
1277
1278@c -----------------------
1279@node Other
1280@section Shadowed Commands
1281
1282@table @kbd
1283
1284@kbditempair{C-c C-a, C-c C-v, slime-nop, slime-nop}
1285This key-binding is shadowed from inf-lisp.
1286
1287@end table
1288
1289@c -----------------------
1290@node Semantic indentation
1291@section Semantic indentation
1292
1293@SLIME{} automatically discovers how to indent the macros in your Lisp
1294system. To do this the Lisp side scans all the macros in the system and
1295reports to Emacs all the ones with @code{&body} arguments. Emacs then
1296indents these specially, putting the first arguments four spaces in and
1297the ``body'' arguments just two spaces, as usual.
1298
1299This should ``just work.'' If you are a lucky sort of person you needn't
1300read the rest of this section.
1301
1302To simplify the implementation, @SLIME{} doesn't distinguish between
1303macros with the same symbol-name but different packages. This makes it
1304fit nicely with Emacs's indentation code. However, if you do have
1305several macros with the same symbol-name then they will all be indented
1306the same way, arbitrarily using the style from one of their
1307arglists. You can find out which symbols are involved in collisions
1308with:
1309
1310@example
1311(swank:print-indentation-lossage)
1312@end example
1313
1314If a collision causes you irritation, don't have a nervous breakdown,
1315just override the Elisp symbol's @code{common-lisp-indent-function}
1316property to your taste. @SLIME{} won't override your custom settings, it
1317just tries to give you good defaults.
1318
1319A more subtle issue is that imperfect caching is used for the sake of
1320performance. @footnote{@emph{Of course} we made sure it was actually too
1321slow before making the ugly optimization.}
1322
1323In an ideal world, Lisp would automatically scan every symbol for
1324indentation changes after each command from Emacs. However, this is too
1325expensive to do every time. Instead Lisp usually just scans the symbols
1326whose home package matches the one used by the Emacs buffer where the
1327request comes from. That is sufficient to pick up the indentation of
1328most interactively-defined macros. To catch the rest we make a full scan
1329of every symbol each time a new Lisp package is created between commands
1330-- that takes care of things like new systems being loaded.
1331
1332You can use @kbd{M-x slime-update-indentation} to force all symbols to
1333be scanned for indentation information.
1334
1335@c -----------------------
1336@node Reader conditionals
1337@section Reader conditional fontification
1338
1339@SLIME{} automatically evaluates reader-conditional expressions, like
1340@code{#+linux}, in source buffers and ``grays out'' code that will be
1341skipped for the current Lisp connection.
1342
1343@c -----------------------
1344@node Debugger
1345@chapter SLDB: the SLIME debugger
1346
1347@cindex Debugger
1348
1349@SLIME{} has a custom Emacs-based debugger called @SLDB{}. Conditions
1350signalled in the Lisp system invoke @SLDB{} in Emacs by way of the
1351Lisp @code{*DEBUGGER-HOOK*}.
1352
1353@SLDB{} pops up a buffer when a condition is signalled. The buffer
1354displays a description of the condition, a list of restarts, and a
1355backtrace. Commands are offered for invoking restarts, examining the
1356backtrace, and poking around in stack frames.
1357
1358@menu
1359* Examining frames::
1360* Restarts::
1361* Frame Navigation::
1362* Stepping::
1363* Miscellaneous::
1364@end menu
1365
1366@c -----------------------
1367@node Examining frames
1368@section Examining frames
1369
1370Commands for examining the stack frame at point.
1371
1372@table @kbd
1373@kbditem{t, sldb-toggle-details}
1374Toggle display of local variables and @code{CATCH} tags.
1375
1376@kbditem{v, sldb-show-source}
1377View the frame's current source expression. The expression is
1378presented in the Lisp source file's buffer.
1379
1380@kbditem{e, sldb-eval-in-frame}
1381Evaluate an expression in the frame. The expression can refer to the
1382available local variables in the frame.
1383
1384@kbditem{d, sldb-pprint-eval-in-frame}
1385Evaluate an expression in the frame and pretty-print the result in a
1386temporary buffer.
1387
1388@kbditem{D, sldb-disassemble}
1389Disassemble the frame's function. Includes information such as the
1390instruction pointer within the frame.
1391
1392@kbditem{i, sldb-inspect-in-frame}
1393Inspect the result of evaluating an expression in the frame.
1394
1395@kbditem{C-c C-c, sldb-recompile-frame-source}
1396Recompile frame. @kbd{C-u C-c C-c} for recompiling with maximum debug settings.
1397
1398@end table
1399
1400@c -----------------------
1401@node Restarts
1402@section Invoking restarts
1403
1404@table @kbd
1405@kbditem{a, sldb-abort}
1406Invoke the @code{ABORT} restart.
1407
1408@anchor{sldb-quit}
1409@kbditem{q, sldb-quit}
1410``Quit'' -- For @SLIME{} evaluation requests, invoke a restart which
1411restores to a known program state. For errors in other threads, see
1412@ref{*SLDB-QUIT-RESTART*}.
1413
1414@kbditem{c, sldb-continue}
1415Invoke the @code{CONTINUE} restart.
1416
1417@item 0 ... 9
1418Invoke a restart by number.
1419@end table
1420
1421Restarts can also be invoked by pressing @kbd{RET} or @kbd{Mouse-2} on
1422them in the buffer.
1423
1424@c -----------------------
1425@node Frame Navigation
1426@section Navigating between frames
1427
1428@table @kbd
1429@kbditempair{n,p,sldb-down,sldb-up}
1430Move between frames.
1431
1432@kbditempair{M-n, M-p, sldb-details-down, sldb-details-up}
1433Move between frames ``with sugar'': hide the details of the original
1434frame and display the details and source code of the next. Sugared
1435motion makes you see the details and source code for the current frame
1436only.
1437
1438@kbditem{>, sldb-end-of-backtrace}
1439Fetch the entire backtrace and go to the last frame.
1440
1441@kbditem{<, sldb-beginning-of-backtrace}
1442Goto the first frame.
1443
1444@end table
1445
1446@node Stepping
1447@section Stepping
1448
1449@cindex Stepping
1450
1451Stepping is not available in all implementations and works very
1452differently in those in which it is available.
1453
1454@table @kbd
1455@kbditem{s, sldb-step}
1456Step to the next expression in the frame.  For CMUCL that means, set a
1457breakpoint at all those code locations in the current code block which
1458are reachable from the current code location.
1459
1460@kbditem{x, sldb-next}
1461Step to the next form in the current function.
1462
1463@kbditem{o, sldb-out}
1464Stop single-stepping temporarily, but resume it once the current
1465function returns.
1466
1467@end table
1468
1469@node Miscellaneous
1470@section Miscellaneous Commands
1471
1472@table @kbd
1473@kbditem{r, sldb-restart-frame}
1474Restart execution of the frame with the same arguments it was
1475originally called with. (This command is not available in all
1476implementations.)
1477
1478@kbditem{R, sldb-return-from-frame}
1479Return from the frame with a value entered in the minibuffer. (This
1480command is not available in all implementations.)
1481
1482
1483@kbditem{B, sldb-break-with-default-debugger}
1484Exit @SLDB{} and debug the condition using the Lisp system's default
1485debugger.
1486
1487@kbditem{C, sldb-inspect-condition}
1488Inspect the condition currently being debugged.
1489
1490@kbditem{:, slime-interactive-eval}
1491Evaluate an expression entered in the minibuffer.
1492@kbditem{A, sldb-break-with-system-debugger}
1493Attach debugger (e.g. gdb) to the current lisp process.
1494
1495@end table
1496
1497
1498@c -----------------------
1499@node Misc
1500@chapter Misc
1501
1502@menu
1503* slime-selector::
1504* slime-macroexpansion-minor-mode::
1505* Multiple connections::
1506@end menu
1507
1508@c -----------------------
1509@node slime-selector
1510@section @code{slime-selector}
1511
1512The @code{slime-selector} command is for quickly switching to
1513important buffers: the @REPL{}, @SLDB{}, the Lisp source you were just
1514hacking, etc. Once invoked the command prompts for a single letter to
1515specify which buffer it should display. If a prefix argument is
1516specified then the buffer is shown in the other window. Here are some
1517of the main options:
1518
1519@table @kbd
1520@item ?
1521A help buffer listing all @code{slime-selectors}'s available buffers.
1522This includes some options of lesser importance, e.g. intended for
1523debugging @SLIME{}, which are not included in this list.
1524@item r
1525The @REPL{} buffer for the current @SLIME{} connection.
1526@item d
1527The most recently activated @SLDB{} buffer for the current connection.
1528@item l
1529The most recently visited @code{lisp-mode} source buffer.
1530@item s
1531The @code{*slime-scratch*} buffer (@pxref{slime-scratch}).
1532@item c
1533SLIME connections buffer (@pxref{Multiple connections}).
1534@item n
1535Cycle to the next Lisp connection (@pxref{Multiple connections}).
1536@item t
1537SLIME threads buffer (@pxref{Multiple connections}).
1538@item i
1539The @code{*inferior-lisp*} buffer for the current connection.
1540@item 4
1541Show buffer in other window. Equivalent to supplying a prefix
1542argument. Prompts again for which buffer to select.
1543@end table
1544
1545@code{slime-selector} doesn't have a key binding by default but we
1546suggest that you assign it a global one. You can bind it to @kbd{C-c s}
1547like this:
1548
1549@example
1550(global-set-key "\C-cs" 'slime-selector)
1551@end example
1552
1553@noindent
1554And then you can switch to the @REPL{} from anywhere with @kbd{C-c s
1555r}.
1556
1557The macro @code{def-slime-selector-method} can be used to define new
1558buffers for @code{slime-selector} to find.
1559
1560@c -----------------------
1561@node slime-macroexpansion-minor-mode
1562@section slime-macroexpansion-minor-mode
1563
1564Within a slime macroexpansion buffer some extra commands are provided
1565(these commands are always available but are only bound to keys in a
1566macroexpansion buffer).
1567
1568@table @kbd
1569@kbditem{C-c C-m, slime-macroexpand-1-inplace}
1570Just like slime-macroexpand-1 but the original form is replaced with
1571the expansion.
1572
1573@c @anchor{slime-macroexpand-1-inplace}
1574@kbditem{g, slime-macroexpand-1-inplace}
1575The last macroexpansion is performed again, the current contents of
1576the macroexpansion buffer are replaced with the new expansion.
1577
1578@kbditem{q, slime-temp-buffer-quit}
1579Close the expansion buffer.
1580
1581@kbditem{C-_, slime-macroexpand-undo}
1582Undo last macroexpansion operation.
1583
1584@end table
1585
1586@c -----------------------
1587@node Multiple connections
1588@section Multiple connections
1589
1590@SLIME{} is able to connect to multiple Lisp processes at the same
1591time. The @kbd{M-x slime} command, when invoked with a prefix
1592argument, will offer to create an additional Lisp process if one is
1593already running. This is often convenient, but it requires some
1594understanding to make sure that your @SLIME{} commands execute in the
1595Lisp that you expect them to.
1596
1597Some buffers are tied to specific Lisp processes. Each Lisp connection
1598has its own @acronym{REPL} buffer, and all expressions entered or
1599@SLIME{} commands invoked in that buffer are sent to the associated
1600connection. Other buffers created by @SLIME{} are similarly tied to
1601the connections they originate from, including @SLDB{} buffers,
1602apropos result listings, and so on. These buffers are the result of
1603some interaction with a Lisp process, so commands in them always go
1604back to that same process.
1605
1606Commands executed in other places, such as @code{slime-mode} source
1607buffers, always use the ``default'' connection. Usually this is the
1608most recently established connection, but this can be reassigned via
1609the ``connection list'' buffer:
1610
1611@table @kbd
1612@kbditem{C-c C-x c, slime-list-connections}
1613Pop up a buffer listing the established connections.  It is also
1614available by the typing @kbd{c} from the @SLIME{} selector
1615(@ref{slime-selector}).
1616
1617@kbditem{C-c C-x n, slime-cycle-connections}
1618Change current Lisp connection by cycling through all connections.  It
1619is also available by the typing @kbd{n} from the SLIME selector
1620(@ref{slime-selector}).
1621
1622@kbditem{C-c C-x t, slime-list-threads}
1623Pop up a buffer listing the current threads.  It is also available by
1624the typing @kbd{t} from the @SLIME{} selector (@ref{slime-selector}).
1625@end table
1626
1627The buffer displayed by @code{slime-list-connections} gives a one-line
1628summary of each connection. The summary shows the connection's serial
1629number, the name of the Lisp implementation, and other details of the
1630Lisp process. The current ``default'' connection is indicated with an
1631asterisk.
1632
1633The commands available in the connection-list buffer are:
1634
1635@table @kbd
1636@kbditem{RET, slime-goto-connection}
1637Pop to the @acronym{REPL} buffer of the connection at point.
1638
1639@kbditem{d, slime-connection-list-make-default}
1640Make the connection at point the ``default'' connection. It will then
1641be used for commands in @code{slime-mode} source buffers.
1642
1643@kbditem{g, slime-update-connection-list}
1644Update the connection list in the buffer.
1645
1646@kbditem{q, slime-temp-buffer-quit}
1647Quit the connection list (kill buffer, restore window configuration).
1648
1649@kbditem{R, slime-restart-connection-at-point}
1650Restart the Lisp process for the connection at point.
1651
1652@cmditem{slime-connect}
1653Connect to a running Swank server.
1654
1655@cmditem{slime-disconnect}
1656Disconnect all connections.
1657
1658@cmditem{slime-abort-connection}
1659Abort the current attempt to connect.
1660
1661@end table
1662
1663
1664@c -----------------------
1665@node Customization
1666@chapter Customization
1667
1668@menu
1669* Emacs-side customization::
1670* Lisp-side::
1671@end menu
1672
1673@c -----------------------
1674@node Emacs-side customization
1675@section Emacs-side
1676
1677The Emacs part of @SLIME{} can be configured with the Emacs
1678@code{customize} system, just use @kbd{M-x customize-group slime
1679RET}. Because the customize system is self-describing, we only cover a
1680few important or obscure configuration options here in the manual.
1681
1682@table @code
1683
1684@item slime-truncate-lines
1685The value to use for @code{truncate-lines} in line-by-line summary
1686buffers popped up by @SLIME{}. This is @code{t} by default, which
1687ensures that lines do not wrap in backtraces, apropos listings, and so
1688on. It can however cause information to spill off the screen.
1689
1690@anchor{slime-completion-at-point-functions}
1691@vindex slime-completion-at-point-functions
1692@item slime-completion-at-point-functions
1693A list of functions used for completion of Lisp symbols.  This works
1694as the standard
1695@code{completion-at-point-functions}
1696(@pxref{Completion in Buffers,,,elisp}).  Three completion
1697styles are available: @code{slime-simple-completion-at-point},
1698@code{slime-complete-symbol*} (@pxref{Compound Completion}),
1699and @code{slime-fuzzy-complete-symbol} (@pxref{Fuzzy Completion}).
1700
1701The default is @code{slime-simple-completion-at-point}, which
1702completes in the usual Emacs way.
1703
1704@vindex slime-filename-translations
1705@item slime-filename-translations
1706This variable controls filename translation between Emacs and the Lisp
1707system. It is useful if you run Emacs and Lisp on separate machines
1708which don't share a common file system or if they share the filesystem
1709but have different layouts, as is the case with @acronym{SMB}-based
1710file sharing.
1711
1712@anchor{slime-net-coding-system}
1713@vindex slime-net-coding-system
1714@cindex Unicode
1715@cindex UTF-8
1716@cindex ASCII
1717@cindex LATIN-1
1718@cindex Character Encoding
1719@item slime-net-coding-system
1720If you want to transmit Unicode characters between Emacs and the Lisp
1721system, you should customize this variable.  E.g., if you use SBCL, you
1722can set:
1723@example
1724(setq slime-net-coding-system 'utf-8-unix)
1725@end example
1726To actually display Unicode characters you also need appropriate
1727fonts, otherwise the characters will be rendered as hollow boxes.  If
1728you are using Allegro CL and GNU Emacs, you can also
1729use @code{emacs-mule-unix} as coding system.  GNU Emacs has often
1730nicer fonts for the latter encoding.  (Different encodings can be used
1731for different Lisps, see @ref{Multiple Lisps}.)
1732
1733@end table
1734
1735@menu
1736* Hooks::
1737@end menu
1738
1739@c -----------------------
1740@node Hooks
1741@subsection Hooks
1742
1743@table @code
1744
1745@vindex slime-mode-hook
1746@item slime-mode-hook
1747This hook is run each time a buffer enters @code{slime-mode}. It is
1748most useful for setting buffer-local configuration in your Lisp source
1749buffers. An example use is to enable @code{slime-autodoc-mode}
1750(@pxref{slime-autodoc-mode}).
1751
1752@anchor{slime-connected-hook}
1753@vindex slime-connected-hook
1754@item slime-connected-hook
1755This hook is run when @SLIME{} establishes a connection to a Lisp
1756server. An example use is to create a Typeout frame (@xref{Typeout frames}.)
1757
1758@vindex sldb-hook
1759@item sldb-hook
1760This hook is run after @SLDB{} is invoked. The hook functions are
1761called from the @SLDB{} buffer after it is initialized. An example use
1762is to add @code{sldb-print-condition} to this hook, which makes all
1763conditions debugged with @SLDB{} be recorded in the @REPL{} buffer.
1764
1765@end table
1766
1767@c -----------------------
1768@node Lisp-side
1769@section Lisp-side (Swank)
1770
1771The Lisp server side of @SLIME{} (known as ``Swank'') offers several
1772variables to configure. The initialization file @file{~/.swank.lisp}
1773is automatically evaluated at startup and can be used to set these
1774variables.
1775
1776@menu
1777* Communication style::
1778* Other configurables::
1779@end menu
1780
1781@c -----------------------
1782@node Communication style
1783@subsection Communication style
1784@vindex SWANK:*COMMUNICATION-STYLE*
1785
1786The most important configurable is @code{SWANK:*COMMUNICATION-STYLE*},
1787which specifies the mechanism by which Lisp reads and processes
1788protocol messages from Emacs. The choice of communication style has a
1789global influence on @SLIME{}'s operation.
1790
1791The available communication styles are:
1792
1793@table @code
1794@item NIL
1795This style simply loops reading input from the communication socket
1796and serves @SLIME{} protocol events as they arise. The simplicity
1797means that the Lisp cannot do any other processing while under
1798@SLIME{}'s control.
1799
1800@item :FD-HANDLER
1801This style uses the classical Unix-style ``@code{select()}-loop.''
1802Swank registers the communication socket with an event-dispatching
1803framework (such as @code{SERVE-EVENT} in @acronym{CMUCL} and
1804@acronym{SBCL}) and receives a callback when data is available. In
1805this style requests from Emacs are only detected and processed when
1806Lisp enters the event-loop. This style is simple and predictable.
1807
1808@item :SIGIO
1809This style uses @dfn{signal-driven I/O} with a @code{SIGIO} signal
1810handler. Lisp receives requests from Emacs along with a signal,
1811causing it to interrupt whatever it is doing to serve the
1812request. This style has the advantage of responsiveness, since Emacs
1813can perform operations in Lisp even while it is busy doing other
1814things. It also allows Emacs to issue requests concurrently, e.g. to
1815send one long-running request (like compilation) and then interrupt
1816that with several short requests before it completes. The
1817disadvantages are that it may conflict with other uses of @code{SIGIO}
1818by Lisp code, and it may cause untold havoc by interrupting Lisp at an
1819awkward moment.
1820
1821@item :SPAWN
1822This style uses multiprocessing support in the Lisp system to execute
1823each request in a separate thread. This style has similar properties
1824to @code{:SIGIO}, but it does not use signals and all requests issued
1825by Emacs can be executed in parallel.
1826
1827@end table
1828
1829The default request handling style is chosen according to the
1830capabilities of your Lisp system. The general order of preference is
1831@code{:SPAWN}, then @code{:SIGIO}, then @code{:FD-HANDLER}, with
1832@code{NIL} as a last resort. You can check the default style by
1833calling @code{SWANK-BACKEND::PREFERRED-COMMUNICATION-STYLE}. You can
1834also override the default by setting
1835@code{SWANK:*COMMUNICATION-STYLE*} in your Swank init file.
1836
1837@c -----------------------
1838@node Other configurables
1839@subsection Other configurables
1840
1841These Lisp variables can be configured via your @file{~/.swank.lisp}
1842file:
1843
1844@table @code
1845
1846@vindex SWANK:*CONFIGURE-EMACS-INDENTATION*
1847@item SWANK:*CONFIGURE-EMACS-INDENTATION*
1848This variable controls whether indentation styles for
1849@code{&body}-arguments in macros are discovered and sent to Emacs. It
1850is enabled by default.
1851
1852@vindex SWANK:*GLOBALLY-REDIRECT-IO*
1853@item SWANK:*GLOBALLY-REDIRECT-IO*
1854When T this causes the standard streams (@code{*standard-output*},
1855etc) to be globally redirected to the @REPL{} in Emacs.
1856
1857When @code{:STARTED-FROM-EMACS} (default) redirects the output when
1858the lisp is launched from emacs (i.e. @kbd{M-x slime}), but not
1859from @kbd{M-x slime-connect}.
1860
1861When @code{NIL} these streams are only temporarily redirected
1862to Emacs using dynamic bindings while handling requests. Note that
1863@code{*standard-input*} is currently never globally redirected into
1864Emacs, because it can interact badly with the Lisp's native @REPL{} by
1865having it try to read from the Emacs one.
1866
1867@vindex SWANK:*GLOBAL-DEBUGGER*
1868@item SWANK:*GLOBAL-DEBUGGER*
1869When true (the default) this causes @code{*DEBUGGER-HOOK*} to be
1870globally set to @code{SWANK:SWANK-DEBUGGER-HOOK} and thus for @SLIME{}
1871to handle all debugging in the Lisp image. This is for debugging
1872multithreaded and callback-driven applications.
1873
1874@anchor{*SLDB-QUIT-RESTART*}
1875@vindex SWANK:*SLDB-QUIT-RESTART*
1876@item SWANK:*SLDB-QUIT-RESTART*
1877This variable names the restart that is invoked when pressing @kbd{q}
1878(@pxref{sldb-quit}) in @SLDB{}. For @SLIME{} evaluation requests this
1879is @emph{unconditionally} bound to a restart that returns to a safe
1880point. This variable is supposed to customize what @kbd{q} does if an
1881application's thread lands into the debugger (see
1882@code{SWANK:*GLOBAL-DEBUGGER*}).
1883@example
1884(setf swank:*sldb-quit-restart* 'sb-thread:terminate-thread)
1885@end example
1886
1887@vindex SWANK:*BACKTRACE-PRINTER-BINDINGS*
1888@vindex SWANK:*MACROEXPAND-PRINTER-BINDINGS*
1889@vindex SWANK:*SLDB-PRINTER-BINDINGS*
1890@vindex SWANK:*SWANK-PPRINT-BINDINGS*
1891@item SWANK:*BACKTRACE-PRINTER-BINDINGS*
1892@itemx SWANK:*MACROEXPAND-PRINTER-BINDINGS*
1893@itemx SWANK:*SLDB-PRINTER-BINDINGS*
1894@itemx SWANK:*SWANK-PPRINT-BINDINGS*
1895These variables can be used to customize the printer in various
1896situations.  The values of the variables are association lists of
1897printer variable names with the corresponding value.  E.g., to enable
1898the pretty printer for formatting backtraces in @SLDB{}, you can use:
1899@example
1900(push '(*print-pretty* . t) swank:*sldb-printer-bindings*).
1901@end example
1902
1903@vindex SWANK:*USE-DEDICATED-OUTPUT-STREAM*
1904@item SWANK:*USE-DEDICATED-OUTPUT-STREAM*
1905This variable controls whether to use an unsafe efficiency hack for
1906sending printed output from Lisp to Emacs.  The default is @code{nil},
1907don't use it, and is strongly recommended to keep.
1908
1909When @code{t}, a separate socket is established solely for Lisp to send
1910printed output to Emacs through, which is faster than sending the output
1911in protocol-messages to Emacs.  However, as nothing can be guaranteed
1912about the timing between the dedicated output stream and the stream of
1913protocol messages, the output of a Lisp command can arrive before or
1914after the corresponding REPL results.  Thus output and REPL results can
1915end up in the wrong order, or even interleaved, in the REPL buffer.
1916Using a dedicated output stream also makes it more difficult to
1917communicate to a Lisp running on a remote host via SSH
1918(@pxref{Connecting to a remote lisp}).
1919
1920@vindex SWANK:*DEDICATED-OUTPUT-STREAM-PORT*
1921@item SWANK:*DEDICATED-OUTPUT-STREAM-PORT*
1922When @code{*USE-DEDICATED-OUTPUT-STREAM*} is @code{t} the stream will
1923be opened on this port. The default value, @code{0}, means that the
1924stream will be opened on some random port.
1925
1926@vindex SWANK:*LOG-EVENTS*
1927@item SWANK:*LOG-EVENTS*
1928Setting this variable to @code{t} causes all protocol messages
1929exchanged with Emacs to be printed to @code{*TERMINAL-IO*}. This is
1930useful for low-level debugging and for observing how @SLIME{} works
1931``on the wire.'' The output of @code{*TERMINAL-IO*} can be found in
1932your Lisp system's own listener, usually in the buffer
1933@code{*inferior-lisp*}.
1934
1935@end table
1936
1937@c -----------------------
1938@node Tips and Tricks
1939@chapter Tips and Tricks
1940
1941@menu
1942* Connecting to a remote lisp::
1943* Global IO Redirection::
1944* Auto-SLIME::
1945@end menu
1946
1947@c -----------------------
1948@node Connecting to a remote lisp
1949@section Connecting to a remote lisp
1950
1951One of the advantages of the way @SLIME{} is implemented is that we can
1952easily run the Emacs side (slime.el) on one machine and the lisp backend
1953(swank) on another. The basic idea is to start up lisp on the remote
1954machine, load swank and wait for incoming @SLIME{} connections. On the
1955local machine we start up emacs and tell @SLIME{} to connect to the
1956remote machine. The details are a bit messier but the underlying idea is
1957that simple.
1958
1959@menu
1960* Setting up the lisp image::
1961* Setting up Emacs::
1962* Setting up pathname translations::
1963@end menu
1964
1965@c -----------------------
1966@node Setting up the lisp image
1967@subsection Setting up the lisp image
1968
1969When you want to load swank without going through the normal, Emacs
1970based, process just load the @file{swank-loader.lisp} file. Just
1971execute
1972
1973@example
1974(load "/path/to/swank-loader.lisp")
1975(swank-loader:init)
1976@end example
1977
1978inside a running lisp image@footnote{@SLIME{} also provides an
1979@acronym{ASDF} system definition which does the same thing}. Now all we
1980need to do is startup our swank server. The first example assumes we're
1981using the default settings.
1982
1983@example
1984(swank:create-server)
1985@end example
1986
1987Since we're going to be tunneling our connection via ssh@footnote{there
1988is a way to connect without an ssh tunnel, but it has the side-effect of
1989giving the entire world access to your lisp image, so we're not going to
1990talk about it} and we'll only have one port open we want to tell swank
1991to not use an extra connection for output (this is actually the default
1992in current @SLIME{}):
1993
1994@example
1995(setf swank:*use-dedicated-output-stream* nil)
1996@end example
1997
1998@c -----------------------
1999If you need to do anything particular
2000(like be able to reconnect to swank after you're done), look into
2001@code{swank:create-server}'s other arguments. Some of these arguments
2002are
2003@table @code
2004
2005@item :PORT
2006Port number for the server to listen on (default: 4005).
2007@item :STYLE
2008See @xref{Communication style}.
2009@item :DONT-CLOSE
2010Boolean indicating if the server will continue to accept connections
2011after the first one (default: @code{NIL}). For ``long-running'' lisp processes
2012to which you want to be able to connect from time to time,
2013specify @code{:dont-close t}
2014@end table
2015
2016So the more complete example will be
2017@example
2018(swank:create-server :port 4005  :dont-close t)
2019@end example
2020On the emacs side you will use something like
2021@example
2022(setq slime-net-coding-system 'utf-8-unix)
2023(slime-connect "localhost" 4005))
2024@end example
2025to connect to this lisp image from the same machine.
2026
2027
2028@node Setting up Emacs
2029@subsection Setting up Emacs
2030
2031Now we need to create the tunnel between the local machine and the
2032remote machine.
2033
2034@example
2035ssh -L4005:localhost:4005 username@@remote.example.com
2036@end example
2037
2038That ssh invocation creates an ssh tunnel between the port 4005 on our
2039local machine and the port 4005 on the remote machine@footnote{By
2040default swank listens for incoming connections on port 4005, had we
2041passed a @code{:port} parameter to @code{swank:create-server} we'd be
2042using that port number instead}.
2043
2044Finally we can start @SLIME{}:
2045
2046@example
2047M-x slime-connect RET RET
2048@end example
2049
2050The @kbd{RET RET} sequence just means that we want to use the default
2051host (@code{localhost}) and the default port (@code{4005}). Even
2052though we're connecting to a remote machine the ssh tunnel fools Emacs
2053into thinking it's actually @code{localhost}.
2054
2055@c -----------------------
2056@node Setting up pathname translations
2057@subsection Setting up pathname translations
2058
2059One of the main problems with running swank remotely is that Emacs
2060assumes the files can be found using normal filenames. if we want
2061things like @code{slime-compile-and-load-file} (@kbd{C-c C-k}) and
2062@code{slime-edit-definition} (@kbd{M-.}) to work correctly we need to
2063find a way to let our local Emacs refer to remote files.
2064
2065There are, mainly, two ways to do this. The first is to mount, using
2066NFS or similar, the remote machine's hard disk on the local machine's
2067file system in such a fashion that a filename like
2068@file{/opt/project/source.lisp} refers to the same file on both
2069machines. Unfortunately NFS is usually slow, often buggy, and not
2070always feasible, fortunately we have an ssh connection and Emacs'
2071@code{tramp-mode} can do the rest.
2072(See @inforef{Top, TRAMP User Manual,tramp}.)
2073
2074What we do is teach Emacs how to take a filename on the remote machine
2075and translate it into something that tramp can understand and access
2076(and vice versa). Assuming the remote machine's host name is
2077@code{remote.example.com}, @code{cl:machine-instance} returns
2078``remote'' and we login as the user ``user'' we can use @code{slime-tramp}
2079contrib to setup the proper translations by simply doing:
2080
2081@example
2082(add-to-list 'slime-filename-translations
2083             (slime-create-filename-translator
2084              :machine-instance "remote"
2085              :remote-host "remote.example.com"
2086              :username "user"))
2087@end example
2088
2089@c -----------------------
2090@node Global IO Redirection
2091@section Globally redirecting all IO to the REPL
2092
2093When connecting via @kbd{M-x slime-connect} @SLIME{} does
2094not change @code{*standard-output*} and friends outside of the
2095@REPL{}. If you have any other threads which call @code{format},
2096@code{write-string}, etc. that output will be seen only in
2097the @code{*inferior-lisp*} buffer or on the terminal, more often than
2098not this is inconvenient. So, if you want code such as this:
2099
2100@example
2101(run-in-new-thread
2102  (lambda ()
2103    (write-line "In some random thread.~%" *standard-output*)))
2104@end example
2105
2106to send its output to @SLIME{}'s repl buffer, as opposed to
2107@code{*inferior-lisp*}, set @code{swank:*globally-redirect-io*} to T
2108in @file{~/.swank.lisp}
2109
2110But when started using @kbd{M-x slime} the streams are redirected by
2111default.
2112
2113@c -----------------------
2114@node Auto-SLIME
2115@section Connecting to SLIME automatically
2116
2117To make @SLIME{} connect to your lisp whenever you open a lisp file
2118just add this to your @file{.emacs}:
2119
2120@example
2121(add-hook 'slime-mode-hook
2122          (lambda ()
2123            (unless (slime-connected-p)
2124              (save-excursion (slime)))))
2125@end example
2126
2127@node Contributed Packages
2128@chapter Contributed Packages
2129
2130In version 2.1 we moved some functionality to separate packages.  This
2131chapter tells you how to load contrib modules and describes what the
2132particular packages do.
2133
2134@menu
2135* Loading Contribs::
2136* REPL::
2137* slime-mrepl::
2138* inferior-slime-mode::
2139* Compound Completion::
2140* Fuzzy Completion::
2141* slime-autodoc-mode::
2142* ASDF::
2143* Banner::
2144* Editing Commands::
2145* Fancy Inspector::
2146* Presentations::
2147* Typeout frames::
2148* TRAMP::
2149* Documentation Links::
2150* Xref and Class Browser::
2151* Highlight Edits::
2152* Scratch Buffer::
2153* SLIME Trace Dialog::
2154* slime-sprof::
2155* SLIME Enhanced M-.::
2156* slime-fancy::
2157* Quicklisp::
2158@end menu
2159
2160@node Loading Contribs
2161@section Loading Contrib Packages
2162
2163@cindex Contribs
2164@cindex Contributions
2165@cindex Plugins
2166
2167Contrib packages aren't loaded by default.  You have to modify your
2168setup a bit so that Emacs knows where to find them and which of them
2169to load.  Generally, you set the variable @code{slime-contribs} with
2170the list of package-names that you want to use. Its default value
2171is @code{slime-fancy} which loads almost everything.  For example, a
2172setup to load the @code{slime-scratch}
2173and @code{slime-editing-commands} packages looks like:
2174
2175@example
2176;; @emph{Setup load-path and autoloads}
2177(add-to-list 'load-path "~/dir/to/cloned/slime")
2178(require 'slime-autoloads)
2179
2180;; @emph{Set your lisp system and some contribs}
2181(setq inferior-lisp-program "/opt/sbcl/bin/sbcl")
2182(setq slime-contribs '(slime-scratch slime-editing-commands))
2183@end example
2184
2185After starting @SLIME{}, the commands of both packages should be
2186available.
2187
2188@subsection Loading and unloading ``on the fly''
2189
2190We recommend that you setup contribs @emph{before} starting @SLIME{} via
2191@kbd{M-x slime}, but if you want to enable more contribs @emph{after}
2192you do that, you can set the @code{slime-contribs} variable to another
2193value and call @code{M-x slime-setup}. Note this though:
2194
2195@itemize @bullet
2196@item
2197If you've removed contribs from the list they won't be unloaded
2198automatically.
2199@item
2200If you have more than one @SLIME{} connection currently active, you must
2201manually repeat the @code{slime-setup} step for each of them.
2202@end itemize
2203
2204Short of restarting Emacs, a reasonable way of unloading contribs is
2205by calling an Emacs Lisp function whose name is obtained by
2206adding @code{-unload} to the contrib's name, for every contrib you
2207wish to unload. So, to remove @code{slime-repl}, you must call
2208@code{slime-repl-unload}. Because the unload function will only, if
2209ever, unload the Emacs Lisp side of the contrib, you may also need to
2210restart your lisps.
2211
2212@c -----------------------
2213@node REPL
2214@section REPL: the ``top level''
2215
2216@cindex Listener
2217
2218@SLIME{} uses a custom Read-Eval-Print Loop (@REPL{}, also known as a
2219``top level'', or listener). The @REPL{} user-interface is written in
2220Emacs Lisp, which gives more Emacs-integration than the traditional
2221@code{comint}-based Lisp interaction:
2222
2223@itemize @bullet
2224@item
2225Conditions signalled in @REPL{} expressions are debugged with @SLDB{}.
2226@item
2227Return values are distinguished from printed output by separate Emacs
2228faces (colours).
2229@item
2230Emacs manages the @REPL{} prompt with markers. This ensures that Lisp
2231output is inserted in the right place, and doesn't get mixed up with
2232user input.
2233@end itemize
2234
2235To load the REPL use @code{(add-to-list 'slime-contribs 'slime-repl)} in your
2236@code{.emacs}.
2237
2238@table @kbd
2239
2240@kbditem{C-c C-z, slime-switch-to-output-buffer}
2241Select the output buffer, preferably in a different window.
2242
2243@kbditem{C-c C-y, slime-call-defun}
2244Insert a call to the function defined around point into the REPL.
2245
2246@kbditem{C-c C-j, slime-eval-last-expression-in-repl}
2247Inserts the last expression to the REPL and evaluates it there.
2248Switches to the current package of the source buffer for the duration.
2249If used with a prefix argument, doesn't switch back afterwards.
2250
2251@end table
2252
2253@menu
2254* REPL commands::
2255* Input Navigation::
2256* Shortcuts::
2257@end menu
2258
2259@c -----------------------
2260@node REPL commands
2261@subsection REPL commands
2262
2263@table @kbd
2264
2265@kbditem{RET, slime-repl-return}
2266Evaluate the current input in Lisp if it is complete. If incomplete,
2267open a new line and indent. If a prefix argument is given then the
2268input is evaluated without checking for completeness.
2269
2270@kbditem{C-RET, slime-repl-closing-return}
2271Close any unmatched parenthesis and then evaluate the current input in
2272Lisp. Also bound to @kbd{M-RET}.
2273
2274@kbditem{TAB, slime-indent-and-complete-symbol}
2275Indent the current line and perform symbol completion.
2276
2277@kbditem{C-j, slime-repl-newline-and-indent}
2278Open and indent a new line.
2279
2280@kbditem{C-a, slime-repl-bol}
2281Go to the beginning of the line, but stop at the @REPL{} prompt.
2282
2283@c @anchor{slime-interrupt}
2284@kbditem{C-c C-c, slime-interrupt}
2285Interrupt the Lisp process with @code{SIGINT}.
2286
2287@c @kbditem{C-c M-g, slime-quit}
2288@c Quit @SLIME{}.
2289
2290@kbditem{C-c M-o, slime-repl-clear-buffer}
2291Clear the entire buffer, leaving only a prompt.
2292
2293@kbditem{C-c C-o, slime-repl-clear-output}
2294Remove the output and result of the previous expression from the
2295buffer.
2296
2297@end table
2298
2299@c -----------------------
2300@node Input Navigation
2301@subsection Input navigation
2302
2303@cindex Input History
2304
2305The input navigation (a.k.a. history) commands are modelled after
2306@code{coming}-mode.  Be careful if you are used to Bash-like
2307keybindings: @kbd{M-p} and @kbd{M-n} use the current input as search
2308pattern and only work Bash-like if the current line is
2309empty. @kbd{C-<up>} and @kbd{C-<up>} work like the up and down keys in
2310Bash.
2311
2312@table @kbd
2313
2314@kbditempair{C-<up>, C-<down>, slime-repl-forward-input, slime-repl-backward-input}
2315Go to the next/previous history item.
2316
2317@kbditempair{M-n, M-p, slime-repl-next-input, slime-repl-previous-input}
2318Search the next/previous item in the command history using the current
2319input as search pattern.  If @kbd{M-n}/@kbd{M-n} is typed two times in
2320a row, the second invocation uses the same search pattern (even if the
2321current input has changed).
2322
2323@kbditempair{M-s, M-r, slime-repl-next-matching-input, slime-repl-previous-matching-input}
2324Search forward/reverse through command history with regex
2325
2326@c @code{slime-repl-@{next,previous@}-input}@*
2327@c @code{slime-repl-@{next,previous@}-matching-input}@*
2328@c @code{comint}-style input history commands.
2329
2330@kbditempair{C-c C-n, C-c C-p, slime-repl-next-prompt, slime-repl-previous-prompt}
2331Move between the current and previous prompts in the @REPL{} buffer.
2332Pressing RET on a line with old input copies that line to the newest
2333prompt.
2334@end table
2335
2336@vindex slime-repl-wrap-history
2337The variable @code{slime-repl-wrap-history} controls wrap around
2338behaviour, i.e. whether cycling should restart at the beginning of the
2339history if the end is reached.
2340
2341@c -----------------------
2342@comment  node-name,  next,  previous,  up
2343@node Shortcuts
2344@subsection Shortcuts
2345
2346@cindex Shortcuts
2347
2348``Shortcuts'' are a special set of @REPL{} commands that are invoked
2349by name. To invoke a shortcut you first press @kbd{,} (comma) at the
2350@REPL{} prompt and then enter the shortcut's name when prompted.
2351
2352Shortcuts deal with things like switching between directories and
2353compiling and loading Lisp systems. The set of shortcuts is listed
2354below, and you can also use the @code{help}
2355shortcut to list them interactively.
2356
2357@table @kbd
2358@item change-directory (aka !d, cd)
2359Change the current directory.
2360
2361@item change-package (aka !p, in, in-package)
2362Change the current package.
2363
2364@item compile-and-load (aka cl)
2365Compile (if necessary) and load a lisp file.
2366
2367@item defparameter (aka !)
2368Define a new global, special, variable.
2369
2370@item disconnect
2371Disconnect all connections.
2372
2373@item help (aka ?)
2374Display the help.
2375
2376@item pop-directory (aka -d)
2377Pop the current directory.
2378
2379@item pop-package (aka -p)
2380Pop the top of the package stack.
2381
2382@item push-directory (aka +d, pushd)
2383Push a new directory onto the directory stack.
2384
2385@item push-package (aka +p)
2386Push a package onto the package stack.
2387
2388@item pwd
2389Show the current directory.
2390
2391@item quit
2392Quit the current Lisp.
2393
2394@item resend-form
2395Resend the last form.
2396
2397@item restart-inferior-lisp
2398Restart *inferior-lisp* and reconnect @SLIME{}.
2399
2400@item sayoonara
2401Quit all Lisps and close all @SLIME{} buffers.
2402
2403@end table
2404
2405@node slime-mrepl
2406@section Multiple REPLs
2407
2408The @code{slime-mrepl} package adds support for multiple listener
2409buffers.  The command @kbd{M-x slime-new-mrepl} creates a new
2410buffer.  In a multi-threaded Lisp, each listener is associated with a
2411separate thread.  In a single-threaded Lisp it's also possible to
2412create multiple listener buffers but the commands are executed
2413sequentially by the same process.
2414
2415@node inferior-slime-mode
2416@section @code{inferior-slime-mode}
2417
2418The @code{inferior-slime-mode} is a minor mode is intended to use with
2419the @code{*inferior-lisp*} lisp buffer.  It provides some of the
2420@SLIME{} commands, like symbol completion and documentation lookup. It
2421also tracks the current directory of the Lisp process.  To install it,
2422add something like this to user @file{.emacs}:
2423
2424@example
2425(add-to-list 'slime-contribs 'inferior-slime)
2426@end example
2427
2428@table @kbd
2429@cmditem{inferior-slime-mode}
2430Turns inferior-slime-mode on or off.
2431@end table
2432
2433@vindex inferior-slime-mode-map
2434The variable @code{inferior-slime-mode-map} contains the extra
2435keybindings.
2436
2437@node Compound Completion
2438@section Compound Completion
2439
2440@anchor{slime-complete-symbol*}
2441The package @code{slime-c-p-c} provides a different symbol completion
2442algorithm, which performs completion ``in parallel'' over the
2443hyphen-delimited sub-words of a symbol name.
2444@footnote{This style of completion is modelled on @file{completer.el}
2445by Chris McConnell. That package is bundled with @acronym{ILISP}.}
2446Formally this means that ``@code{a-b-c}'' can complete to any symbol
2447matching the regular expression ``@code{^a.*-b.*-c.*}'' (where ``dot''
2448matches anything but a hyphen). Examples give a more intuitive
2449feeling:
2450@itemize @bullet
2451@item
2452@code{m-v-b} completes to @code{multiple-value-bind}.
2453@item
2454@code{w-open} is ambiguous: it completes to either
2455@code{with-open-file} or @code{with-open-stream}. The symbol is
2456expanded to the longest common completion (@code{with-open-}) and the
2457point is placed at the first point of ambiguity, which in this case is
2458the end.
2459@item
2460@code{w--stream} completes to @code{with-open-stream}.
2461@end itemize
2462
2463The variable @code{slime-c-p-c-unambiguous-prefix-p} specifies where
2464point should be placed after completion.  E.g. the possible
2465completions for @code{f-o} are @code{finish-output} and
2466@code{force-output}.  By the default point is moved after the
2467@code{f}, because that is the unambiguous prefix.  If
2468@code{slime-c-p-c-unambiguous-prefix-p} is nil, point moves to
2469the end of the inserted text, after the @code{o} in this case.
2470
2471In addition, @code{slime-c-p-c} provides completion for character names
2472(mostly useful for Unicode-aware implementations):
2473
2474@example
2475CL-USER> #\Sp<TAB>
2476@end example
2477
2478Here @SLIME{} will usually complete the character to @code{#\Space}, but
2479in a Unicode-aware implementation, this might provide the following
2480completions:
2481@example
2482Space                              Space
2483Sparkle                            Spherical_Angle
2484Spherical_Angle_Opening_Left       Spherical_Angle_Opening_Up
2485@end example
2486
2487The package @code{slime-c-p-c} also provides context-sensitive
2488completion for keywords.  Example:
2489
2490@example
2491CL-USER> (find 1 '(1 2 3) :s<TAB>
2492@end example
2493
2494Here @SLIME{} will complete @code{:start}, rather than suggesting all
2495ever-interned keywords starting with @code{:s}.
2496
2497
2498@table @kbd
2499@kbditem{C-c C-s, slime-complete-form}
2500Looks up and inserts into the current buffer the argument list for the
2501function at point, if there is one.  More generally, the command
2502completes an incomplete form with a template for the missing arguments.
2503There is special code for discovering extra keywords of generic
2504functions and for handling @code{make-instance},
2505@code{defmethod}, and many other functions. Examples:
2506
2507@example
2508(subseq "abc" <C-c C-s>
2509  --inserts--> start [end])
2510(find 17 <C-c C-s>
2511  --inserts--> sequence :from-end from-end :test test
2512               :test-not test-not :start start :end end
2513               :key key)
2514(find 17 '(17 18 19) :test #'= <C-c C-s>
2515  --inserts--> :from-end from-end
2516               :test-not test-not :start start :end end
2517               :key key)
2518(defclass foo () ((bar :initarg :bar)))
2519(defmethod print-object <C-c C-s>
2520  --inserts-->   (object stream)
2521               body...)
2522(defmethod initialize-instance :after ((object foo) &key blub))
2523(make-instance 'foo <C-c C-s>
2524  --inserts--> :bar bar :blub blub initargs...)
2525@end example
2526@end table
2527
2528@node Fuzzy Completion
2529@section Fuzzy Completion
2530
2531The package @code{slime-fuzzy} implements yet another symbol
2532completion heuristic.
2533
2534@table @kbd
2535@anchor{slime-fuzzy-complete-symbol}
2536@kbditem{C-c M-i, slime-fuzzy-complete-symbol}
2537Presents a list of likely completions to choose from for an
2538abbreviation at point.  If you set the
2539variable @code{slime-complete-symbol-function} to this command, fuzzy
2540completion will also be used for @kbd{M-TAB}.
2541@end table
2542
2543@subsection The Algorithm
2544
2545It attempts to complete a symbol all at once, instead of in pieces.
2546For example, ``mvb'' will find ``@code{multiple-value-bind}'' and
2547``norm-df'' will find
2548``@code{least-positive-normalized-double-float}''.
2549
2550The algorithm tries to expand every character in various ways and
2551rates the list of possible completions with the following heuristic.
2552
2553Letters are given scores based on their position in the string.
2554Letters at the beginning of a string or after a prefix letter at
2555the beginning of a string are scored highest.  Letters after a
2556word separator such as #\- are scored next highest.  Letters at
2557the end of a string or before a suffix letter at the end of a
2558string are scored medium, and letters anywhere else are scored
2559low.
2560
2561If a letter is directly after another matched letter, and its
2562intrinsic value in that position is less than a percentage of the
2563previous letter's value, it will use that percentage instead.
2564
2565Finally, a small scaling factor is applied to favor shorter
2566matches, all other things being equal.
2567
2568@subsection Duplicate Symbols
2569
2570In case a symbol is accessible via several packages, duplicate symbol
2571filter specified via @code{*fuzzy-duplicate-symbol-filter*} swank
2572variable is applied. @code{:nearest-package} value specifies that only
2573symbols in the package with highest score should be kept.
2574@code{:home-package} specifies that only the match that represents the home
2575package of the symbol is used, and @code{:all} value specifies that
2576duplicate symbol filter mode should be turned off.
2577
2578To specify a custom filter, set @code{*fuzzy-duplicate-symbol-filter*}
2579to a function accepting three arguments: the name of package being
2580examined, the list of names of all packages being examined with
2581packages with highest matching score listed first and an @code{equal}
2582hash-table that is shared between calls to the function and can be
2583used for deduplication purposes. The function should return a
2584deduplication filter function which accepts a symbol and returns true
2585if the symbol should be kept.
2586
2587For example, the effect of @code{:nearest-package} can be also achieved
2588by specifying the following custom filter in @file{~/.swank.lisp}:
2589@example
2590(setf *fuzzy-duplicate-symbol-filter*
2591      (lambda (cur-package all-packages dedup-table)
2592        (declare (ignore cur-package all-packages))
2593        (lambda (symbol)
2594           (unless (gethash (symbol-name symbol) dedup-table)
2595              (setf (gethash (symbol-name symbol) dedup-table) t)))))
2596@end example
2597And instead of @code{:home-package}, the following can be used:
2598@example
2599(setf *fuzzy-duplicate-symbol-filter*
2600      (lambda (cur-package all-packages dedup-table)
2601        (declare (ignore dedup-table))
2602        (let ((packages (mapcar #'find-package
2603                                (remove cur-package all-packages))))
2604          (lambda (symbol)
2605            (not (member (symbol-package symbol) packages))))))
2606@end example
2607
2608@node slime-autodoc-mode
2609@section @code{slime-autodoc-mode}
2610
2611Autodoc mode is an additional minor-mode for automatically showing
2612information about symbols near the point. For function names the
2613argument list is displayed, and for global variables, the value.
2614Autodoc is implemented by means of @code{eldoc-mode} of Emacs.
2615
2616The mode can be enabled by default in your @code{~/.emacs}:
2617@example
2618(add-to-list 'slime-contribs 'slime-autodoc)
2619@end example
2620
2621@table @kbd
2622@cmditem{slime-arglist NAME}
2623Show the argument list of the function NAME.
2624
2625@cmditem{slime-autodoc-mode}
2626Toggles autodoc-mode on or off according to the argument, and
2627toggles the mode when invoked without argument.
2628@kbditem{C-c C-d a, slime-autodoc-manually}
2629Like slime-autodoc, but when called twice,
2630or after slime-autodoc was already automatically called,
2631display multiline arglist.
2632@end table
2633
2634@vindex slime-use-autodoc-mode
2635If the variable @code{slime-use-autodoc-mode} is set (default), Emacs
2636starts a timer, otherwise the information is only displayed after
2637pressing SPC.
2638
2639@vindex slime-autodoc-use-multiline-p
2640If @code{slime-autodoc-use-multiline-p} is set to non-nil,
2641allow long autodoc messages to resize echo area display.
2642
2643@vindex slime-autodoc-mode-string
2644@code{slime-autodoc-mode-string} is a string that will be displayed in
2645the mode line when autodoc-mode is enabled, or nil, if you prefer no
2646indication. You can customize this variable.
2647
2648@node ASDF
2649@section ASDF
2650
2651@acronym{ASDF} is a popular ``system construction tool''.  The package
2652@code{slime-asdf} provides some commands to load and compile such
2653systems from Emacs.  @acronym{ASDF} itself is not included with
2654@SLIME{}; you have to load that yourself into your Lisp.  In
2655particular, you must load @acronym{ASDF} before you connect, otherwise
2656you will get errors about missing symbols.
2657
2658@table @kbd
2659@cmditem{slime-load-system NAME}
2660Compile and load an ASDF system.  The default system name is taken
2661from the first file matching *.asd in the current directory.
2662@cmditem{slime-reload-system NAME}
2663Recompile and load an ASDF system without recompiling its dependencies.
2664@cmditem{slime-open-system NAME &optional LOAD}
2665Open all files in a system, optionally load it if LOAD is non-nil.
2666@cmditem{slime-browse-system NAME}
2667Browse files in a system using Dired.
2668@cmditem{slime-delete-system-fasls NAME}
2669Delete FASLs produced by compiling a system.
2670@cmditem{slime-rgrep-system NAME REGEXP}
2671Run @code{rgrep} on the base directory of an ASDF system.
2672@cmditem{slime-isearch-system NAME}
2673Run @code{isearch-forward} on the files of an ASDF system.
2674@cmditem{slime-query-replace-system NAME FROM TO &OPTIONAL DELIMITED}
2675Run @code{query-replace} on an ASDF system.
2676@end table
2677The package also installs some new REPL shortcuts (@pxref{Shortcuts}):
2678
2679@table @kbd
2680@item load-system
2681Compile (as needed) and load an ASDF system.
2682@item reload-system
2683Recompile and load an ASDF system.
2684@item compile-system
2685Compile (but not load) an ASDF system.
2686@item force-compile-system
2687Recompile (but not load) an ASDF system.
2688@item force-load-system
2689Recompile and load an ASDF system.
2690@item open-system
2691Open all files in a system.
2692@item browse-system
2693Browse files in a system using Dired.
2694@item delete-system-fasls
2695Delete FASLs produced by compiling a system.
2696@end table
2697
2698@node Banner
2699@section Banner
2700The package @code{slime-banner} installs a window header line (
2701@inforef{Header Lines, , elisp}.) in the REPL buffer.  It also runs an
2702animation at startup.
2703
2704@vindex slime-startup-animation
2705@vindex slime-header-line-p
2706By setting the variable @code{slime-startup-animation} to nil you can
2707disable the animation respectively with the
2708variable @code{slime-header-line-p} the header line.
2709
2710@node Editing Commands
2711@section Editing Commands
2712
2713The package @code{slime-editing-commands} provides some commands to
2714edit Lisp expressions.
2715
2716@table @kbd
2717@kbditem{C-c M-q, slime-reindent-defun}
2718Re-indents the current defun, or refills the current paragraph.
2719If point is inside a comment block, the text around point will be
2720treated as a paragraph and will be filled with @code{fill-paragraph}.
2721Otherwise, it will be treated as Lisp code, and the current defun
2722will be reindented.  If the current defun has unbalanced parens,
2723an attempt will be made to fix it before reindenting.
2724
2725@kbditem{C-c C-], slime-close-all-parens-in-sexp}
2726Balance parentheses of open s-expressions at point.
2727Insert enough right parentheses to balance unmatched left parentheses.
2728Delete extra left parentheses.  Reformat trailing parentheses
2729Lisp-stylishly.
2730
2731If REGION is true, operate on the region. Otherwise operate on
2732the top-level sexp before point.
2733
2734@cmditem{slime-insert-balanced-comments}
2735Insert a set of balanced comments around the s-expression containing
2736the point.  If this command is invoked repeatedly (without any other
2737command occurring between invocations), the comment progressively
2738moves outward over enclosing expressions.  If invoked with a positive
2739prefix argument, the s-expression arg expressions out is enclosed in a
2740set of balanced comments.
2741
2742@kbditem{M-C-a, slime-beginning-of-defun}
2743@kbditem{M-C-e, slime-end-of-defun}
2744@end table
2745
2746@node Fancy Inspector
2747@section Fancy Inspector
2748
2749@cindex Methods
2750
2751An alternative to default inspector is provided by the package
2752`slime-fancy-inspector'.  This inspector knows a lot about CLOS
2753objects and methods.  It provides many ``actions'' that can be
2754selected to invoke Lisp code on the inspected object. For example, to
2755present a generic function the inspector shows the documentation in
2756plain text and presents each method with both a hyperlink to inspect
2757the method object and a ``remove method'' action that you can invoke
2758interactively.  The key-bindings are the same as for the basic
2759inspector (@pxref{Inspector}).
2760
2761@node Presentations
2762@section Presentations
2763
2764@cindex Presentations
2765
2766A ``presentation''@footnote{Presentations are a feature originating
2767from the Lisp machines.  It was possible to define @code{present}
2768methods specialized to various devices, e.g. to draw an object to
2769bitmapped screen or to write some text to a character stream.} in
2770@SLIME{} is a region of text associated with a Lisp object.
2771Right-clicking on the text brings up a menu with operations for the
2772particular object.  Some operations, like inspecting, are available
2773for all objects, but the object may also have specialized operations.
2774For instance, pathnames have a dired operation.
2775
2776More importantly, it is possible to cut and paste presentations (i.e.,
2777Lisp objects, not just their printed presentation), using all standard
2778Emacs commands.  This way it is possible to cut and paste the results of
2779previous computations in the REPL.  This is of particular importance for
2780unreadable objects.
2781
2782The package @code{slime-presentations} installs presentations in the
2783REPL, i.e. the results of evaluation commands become presentations.  In
2784this way, presentations generalize the use of the standard Common Lisp
2785REPL history variables @code{*}, @code{**}, @code{***}.  Example:
2786
2787@example
2788CL-USER> (find-class 'standard-class)
2789@emph{#<STANDARD-CLASS STANDARD-CLASS>}
2790CL-USER>
2791@end example
2792
2793Presentations appear in red color in the buffer.
2794(In this manual, we indicate the presentations @emph{like this}.)
2795Using standard Emacs
2796commands, the presentation can be copied to a new input in the REPL:
2797
2798@example
2799CL-USER> (eql '@emph{#<STANDARD-CLASS STANDARD-CLASS>}
2800              '@emph{#<STANDARD-CLASS STANDARD-CLASS>})
2801@emph{T}
2802@end example
2803
2804Note that standard evaluation and quoting rules still apply.  So if a
2805presentation is a list, it needs to be quoted in an evaluated context to
2806avoid treating it as a function call:
2807
2808@example
2809CL-USER> (list (find-class 'standard-class) 2 3 4)
2810@emph{(#<STANDARD-CLASS STANDARD-CLASS> 2 3 4)}
2811CL-USER> @emph{(#<STANDARD-CLASS STANDARD-CLASS> 2 3 4)}
2812; Funcall of #<STANDARD-CLASS STANDARD-CLASS> which is a non-function.
2813; Evaluation aborted.
2814CL-USER> '@emph{(#<STANDARD-CLASS STANDARD-CLASS> 2 3 4)}
2815(#<STANDARD-CLASS STANDARD-CLASS> 2 3 4)
2816@end example
2817
2818When you copy an incomplete presentation or edit the text within a
2819presentation, the presentation changes to plain text, losing the
2820association with a Lisp object.  In the buffer, this is indicated by
2821changing the color of the text from red to black.  This can be undone.
2822
2823Presentations are also available in the inspector (all inspectable parts
2824are presentations) and the debugger (all local variables are
2825presentations).  This makes it possible to evaluate expressions in the
2826REPL using objects that appear in local variables of some active
2827debugger frame; this can be more convenient than using @code{M-x
2828sldb-eval-in-frame}.  @strong{Warning:} The presentations that stem from
2829the inspector and debugger are only valid as long as the corresponding
2830buffers are open.  Using them later can cause errors or confusing
2831behavior.
2832
2833For some Lisp implementations you can also install the package
2834@code{slime-presentation-streams}, which enables presentations on the
2835Lisp @code{*standard-output*} stream and similar streams.  This means
2836that not only results
2837of computations, but also some objects that are printed to the standard
2838output (as a side-effect of the computation) are associated with
2839presentations.  Currently, all unreadable objects
2840and pathnames get printed as presentations.
2841
2842@example
2843CL-USER> (describe (find-class 'standard-object))
2844@emph{#<STANDARD-CLASS STANDARD-OBJECT>} is an instance of
2845    @emph{#<STANDARD-CLASS STANDARD-CLASS>}:
2846 The following slots have :INSTANCE allocation:
2847  PLIST                   NIL
2848  FLAGS                   1
2849  DIRECT-METHODS          ((@emph{#<STANDARD-METHOD
2850                              SWANK::ALL-SLOTS-FOR-INSPECTOR
2851                              (STANDARD-OBJECT T)>}
2852  ...
2853@end example
2854
2855Again, this makes it possible to inspect and copy-paste these objects.
2856
2857In addition to the standard Emacs commands, there are several keyboard
2858commands, a menu-bar menu, and a context menu to operate on
2859presentations.  We describe the keyboard commands below; they are also
2860shown in the menu-bar menu.
2861
2862@table @kbd
2863@kbditem{C-c C-v SPC, slime-mark-presentation}
2864If point is within a presentation, move point to the beginning of the
2865presentation and mark to the end of the presentation.
2866This makes it possible to copy the presentation.
2867
2868@kbditem{C-c C-v w, slime-copy-presentation-at-point-to-kill-ring}
2869If point is within a presentation, copy the surrounding presentation
2870to the kill ring.
2871
2872@kbditem{C-c C-v r, slime-copy-presentation-at-point-to-repl}
2873If point is within a presentation, copy the surrounding presentation
2874to the REPL.
2875
2876@kbditem{C-c C-v d, slime-describe-presentation-at-point}
2877If point is within a presentation, describe the associated object.
2878
2879@kbditem{C-c C-v i, slime-inspect-presentation-at-point}
2880If point is within a presentation, inspect the associated object with
2881the @SLIME{} inspector.
2882
2883@kbditem{C-c C-v n, slime-next-presentation}
2884Move point to the next presentation in the buffer.
2885
2886@kbditem{C-c C-v p, slime-previous-presentation}
2887Move point to the previous presentation in the buffer.
2888
2889@end table
2890Similar operations are also possible from the context menu of every
2891presentation.  Using @kbd{mouse-3} on a presentation, the context menu
2892opens and offers various commands.  For some objects, specialized
2893commands are also offered.  Users can define additional specialized
2894commands by defining a method for
2895@code{swank::menu-choices-for-presentation}.
2896
2897
2898@strong{Warning:} On Lisp implementations without weak hash tables,
2899all objects associated with presentations are protected from garbage
2900collection.  If your Lisp image grows too large because of that,
2901use @kbd{C-c C-v M-o} (@code{slime-clear-presentations}) to remove these
2902associations.  You can also use the command @kbd{C-c M-o}
2903(@code{slime-repl-clear-buffer}), which both clears the REPL buffer and
2904removes all associations of objects with presentations.
2905
2906@strong{Warning:} Presentations can confuse new users.
2907
2908@example
2909CL-USER> (cons 1 2)
2910@emph{(1 . 2)}
2911CL-USER> (eq '@emph{(1 . 2)} '@emph{(1 . 2)})
2912@emph{T}
2913@end example
2914
2915One could have expected @code{NIL} here, because it looks like two
2916fresh cons cells are compared regarding object identity.
2917However, in the example the presentation @code{@emph{(1 . 2)}} was copied twice
2918to the REPL.  Thus @code{EQ} is really invoked with the same object,
2919namely the cons cell that was returned by the first form entered in the
2920REPL.
2921
2922@node Typeout frames
2923@section Typeout frames
2924
2925@cindex Typeout Frame
2926
2927A ``typeout frame'' is a special Emacs frame which is used instead of
2928the echo area (minibuffer) to display messages from @SLIME{} commands.
2929This is an optional feature. The advantage of a typeout frame over the
2930echo area is that it can hold more text, it can be scrolled, and its
2931contents don't disappear when you press a key. All potentially long
2932messages are sent to the typeout frame, such as argument lists, macro
2933expansions, and so on.
2934
2935@table @kbd
2936@cmditem{slime-ensure-typeout-frame}
2937Ensure that a typeout frame exists, creating one if necessary.
2938@end table
2939
2940If the typeout frame is closed then the echo area will be used again
2941as usual.
2942
2943To have a typeout frame created automatically at startup you should
2944load the @code{slime-typeout-frame} package. (@pxref{Loading Contribs}.)
2945
2946The variable @code{slime-typeout-frame-properties} specifies the
2947height and possibly other properties of the frame.  Its value is
2948passed to @code{make-frame}. (@inforef{Creating Frames, ,elisp}.)
2949
2950@node TRAMP
2951@section TRAMP
2952
2953@cindex TRAMP
2954
2955The package @code{slime-tramp} provides some functions to set up
2956filename translations for TRAMP. (@pxref{Setting up pathname
2957translations})
2958
2959@node Documentation Links
2960@section Documentation Links
2961
2962For certain error messages, SBCL includes references to the ANSI
2963Standard or the SBCL User Manual.  The @code{slime-references} package
2964turns those references into clickable links.  This makes finding the
2965referenced section of the HyperSpec much easier.
2966
2967@node Xref and Class Browser
2968@section Xref and Class Browser
2969
2970A rudimentary class browser is provided by
2971the @code{slime-xref-browser} package.
2972
2973@table @kbd
2974@cmditem{slime-browse-classes}
2975This command asks for a class name and displays inheritance tree of
2976for the class.
2977
2978@cmditem{slime-browse-xrefs}
2979This command prompts for a symbol and the kind of cross reference,
2980e.g. callers.  The cross reference tree rooted at the symbol is then
2981then displayed.
2982
2983@end table
2984
2985
2986@node Highlight Edits
2987@section Highlight Edits
2988
2989@code{slime-highlight-edits} is a minor mode to highlight those
2990regions in a Lisp source file which are modified.  This is useful to
2991quickly find those functions which need to be recompiled (with
2992@kbd{C-c C-c})
2993
2994@table @kbd
2995@cmditem{slime-highlight-edits-mode}
2996Turns @code{slime-highlight-edits-mode} on or off.
2997@end table
2998
2999@node Scratch Buffer
3000@section Scratch Buffer
3001
3002@anchor{slime-scratch}
3003The @SLIME{} scratch buffer, in contrib package @code{slime-scratch},
3004imitates Emacs' usual @code{*scratch*} buffer.
3005If @code{slime-scratch-file} is set, it is used to back the scratch
3006buffer, making it persistent. The buffer is like any other Lisp
3007buffer, except for the command bound to @kbd{C-j}.
3008
3009@table @kbd
3010
3011@kbditem{C-j, slime-eval-print-last-expression}
3012Evaluate the expression sexp before point and insert print value into
3013the current buffer.
3014
3015@cmditem{slime-scratch}
3016Create a @file{*slime-scratch*} buffer. In this
3017buffer you can enter Lisp expressions and evaluate them with
3018@kbd{C-j}, like in Emacs's @file{*scratch*} buffer.
3019
3020@end table
3021
3022@node SLIME Trace Dialog
3023@section SLIME Trace Dialog
3024
3025The @SLIME{} Trace Dialog, in package @code{slime-trace-dialog}, is a
3026tracing facility, similar to Common Lisp's @code{trace}, but
3027interactive rather than purely textual. It is an Emacs 24-only
3028contrib.
3029
3030You use it just like you would regular @code{trace}: after tracing a
3031function, calling it causes interesting information about that
3032particular call to be reported.
3033
3034However, instead of printing the trace results to the
3035the @code{*trace-output*} stream (usually the REPL), the @SLIME{}
3036Trace Dialog collects and stores them in your lisp environment until,
3037on user's request, they are fetched into Emacs and displayed in a
3038dialog-like interactive view.
3039
3040After starting up @SLIME{}, @SLIME{}'s Trace Dialog installs
3041a @emph{Trace} menu in the menu-bar of any @code{slime-mode} buffer and
3042adds two new commands, with respective key-bindings:
3043
3044@table @kbd
3045@kbditem{C-c M-t, slime-trace-dialog-toggle-trace}
3046If point is on a symbol name, toggle tracing of its function
3047definition. If point is not on a symbol, prompt user for a function.
3048
3049With a @kbd{C-u} prefix argument, and if your lisp implementation
3050allows it, attempt to decipher lambdas, methods and other complicated
3051function signatures.
3052
3053The function is traced for the @SLIME{} Trace Dialog only, i.e. it is
3054not found in the list returned by Common Lisp's @code{trace}.
3055
3056@kbditem{C-c T, slime-trace-dialog}
3057Pop to the interactive SLIME Trace Dialog buffer associated with the
3058current connection (@pxref{Multiple connections}).
3059@end table
3060
3061@page
3062Consider the (useless) program:
3063
3064@example
3065(defun foo (n) (if (plusp n) (* n (bar (1- n))) 1))
3066(defun bar (n) (if (plusp n) (* n (foo (1- n))) 1))
3067@end example
3068
3069After tracing both @code{foo} and @code{bar} with @kbd{C-c M-t},
3070calling call @code{(foo 2)} and moving to the trace dialog with
3071@kbd{C-c T}, we are presented with this buffer.
3072
3073@example
3074Traced specs (2)                                  [refresh]
3075                                                  [untrace all]
3076  [untrace] common-lisp-user::bar
3077  [untrace] common-lisp-user::foo
3078
3079Trace collection status (3/3)                     [refresh]
3080                                                  [clear]
3081
3082   0 - common-lisp-user::foo
3083     | > 2
3084     | < 2
3085   1 `--- common-lisp-user::bar
3086        | > 1
3087        | < 1
3088   2    `-- common-lisp-user::foo
3089             > 0
3090             < 1
3091@end example
3092
3093The dialog is divided into sections displaying the functions already
3094traced, the trace collection progress and the actual trace tree that
3095follow your program's logic. The most important key-bindings in this
3096buffer are:
3097
3098@table @kbd
3099@kbditem{g, slime-trace-dialog-fetch-status}
3100Update information on the trace collection and traced specs.
3101@kbditem{G, slime-trace-dialog-fetch-traces}
3102Fetch the next batch of outstanding (not fetched yet) traces. With a
3103@kbd{C-u} prefix argument, repeat until no more outstanding traces.
3104@kbditem{C-k, slime-trace-dialog-clear-fetched-traces}
3105Prompt for confirmation, then clear all traces, both fetched and
3106outstanding.
3107@end table
3108
3109The arguments and return values below each entry are interactive
3110buttons. Clicking them opens the inspector
3111(@pxref{Inspector}). Invoking @kbd{M-RET}
3112(@code{slime-trace-dialog-copy-down-to-repl}) returns them to the REPL
3113for manipulation (@pxref{REPL}). The number left of each entry
3114indicates its absolute position in the calling order, which might
3115differ from display order in case multiple threads call the same
3116traced function.
3117
3118@code{slime-trace-dialog-hide-details-mode} hides arguments and return
3119values so you can concentrate on the calling logic. Additionally,
3120@code{slime-trace-dialog-autofollow-mode} will automatically
3121display additional detail about an entry when the cursor moves over
3122it.
3123
3124@node slime-sprof
3125@section @code{slime-sprof}
3126
3127@code{slime-sprof} is a package for integrating SBCL's statistical profiler, sb-sprof.
3128
3129The variable @code{slime-sprof-exclude-swank} controls whether to
3130display swank functions. The default value is NIL.
3131
3132@table @kbd
3133
3134@cmditem{slime-sprof-start}
3135Start profiling.
3136
3137@cmditem{slime-sprof-stop}
3138Stop profiling.
3139@cmditem{slime-sprof-report}
3140Report results of the profiling.
3141@end table
3142
3143The following keys are defined in slime-sprof-browser mode:
3144@table @kbd
3145
3146@kbditem{RET, slime-sprof-browser-toggle}
3147Expand / collapse function details (callers, calls to)
3148@kbditem{v, slime-sprof-browser-view-source}
3149View function sources.
3150@kbditem{d, slime-sprof-browser-disassemble-function}
3151Disassemble function.
3152@kbditem{s, slime-sprof-toggle-swank-exclusion}
3153Toggle exclusion of swank functions from the report.
3154
3155@end table
3156
3157@node SLIME Enhanced M-.
3158@section SLIME Enhanced M-.
3159@code{slime-mdot-fu} enables meta-point to jump to local variables
3160bound with @code{let} and @code{let*}, in addition to function bindings
3161declared with @code{flet} and @code{labels}, via
3162@code{slime-edit-local-definition}.
3163
3164@node slime-fancy
3165@section Meta package: @code{slime-fancy}
3166
3167@code{slime-fancy} is a meta package which loads a combination of the
3168most popular packages. It is the default value of
3169@code{slime-contribs}, thus it is loaded by default.
3170
3171@node Quicklisp
3172@section Quicklisp
3173The package @code{slime-quicklisp} adds support for loading Quicklisp
3174systems in the REPL buffer.  In order for this to work, Quicklisp
3175should have already been loaded in the Lisp implementation.  Refer
3176to @url{https://www.quicklisp.org/} for Quicklisp installation
3177details.
3178
3179The package installs the following REPL shortcuts (@pxref{Shortcuts}):
3180
3181@table @kbd
3182@item quicklisp-quickload (aka ql)
3183Load a Quicklisp system.
3184@end table
3185
3186@c -----------------------
3187@node Credits
3188@chapter Credits
3189
3190@emph{The soppy ending...}
3191
3192@unnumberedsec Hackers of the good hack
3193
3194@SLIME{} is an Extension of @acronym{SLIM} by Eric Marsden. At the
3195time of writing, the authors and code-contributors of @SLIME{} are:
3196
3197@include contributors.texi
3198
3199... not counting the bundled code from @file{hyperspec.el},
3200@cite{CLOCC}, and the @cite{CMU AI Repository}.
3201
3202Many people on the @code{slime-devel} mailing list have made non-code
3203contributions to @SLIME{}. Life is hard though: you gotta send code to
3204get your name in the manual. @code{:-)}
3205
3206@unnumberedsec Thanks!
3207
3208We're indebted to the good people of @code{common-lisp.net} for their
3209hosting and help, and for rescuing us from ``Sourceforge hell.''
3210
3211Implementors of the Lisps that we support have been a great help. We'd
3212like to thank the @acronym{CMUCL} maintainers for their helpful
3213answers, Craig Norvell and Kevin Layer at Franz providing Allegro CL
3214licenses for @SLIME{} development, and Peter Graves for his help to
3215get @SLIME{} running with @acronym{ABCL}.
3216
3217Most of all we're happy to be working with the Lisp implementors
3218who've joined in the @SLIME{} development: Dan Barlow and Christophe
3219Rhodes of @acronym{SBCL}, Gary Byers of OpenMCL, and Martin Simmons of
3220LispWorks. Thanks also to Alain Picard and Memetrics for funding
3221Martin's initial work on the LispWorks backend!
3222
3223@ignore
3224This index is currently ignored, because texinfo's built-in indexing
3225produces nicer results.  -- Helmut Eller
3226
3227@c@node Index to Functions
3228@c@appendix Index to Functions
3229
3230These functions are all available (when relevant). To find the
3231keybinding (if there is one) refer to the function description.
3232
3233@c Note to editors: @fcnindex{...} lines commented out below are place holders
3234@c ----------------
3235@c They have yet to be documented
3236@c Please feel free to add descriptions in the text where appropriate, add the
3237@c appropriate anchors and uncomment them.
3238@c
3239@c [jkc]
3240
3241@table @code
3242@fcnindex{common-lisp-hyperspec-format}
3243@fcnindex{sldb-abort}
3244@c @fcnindex{sldb-activate}
3245@c @fcnindex{sldb-add-face}
3246@c @fcnindex{sldb-backward-frame}
3247@c @fcnindex{sldb-beginning-of-backtrace}
3248@c @fcnindex{sldb-break}
3249@c @fcnindex{sldb-break-on-return}
3250@fcnindex{sldb-break-with-default-debugger}
3251@c @fcnindex{sldb-buffers}
3252@c @fcnindex{sldb-catch-tags}
3253@fcnindex{sldb-continue}
3254@c @fcnindex{sldb-debugged-continuations}
3255@c @fcnindex{sldb-default-action}
3256@c @fcnindex{sldb-default-action/mouse}
3257@c @fcnindex{sldb-delete-overlays}
3258@c @fcnindex{sldb-details-down}
3259@c @fcnindex{sldb-details-up}
3260@fcnindex{sldb-disassemble}
3261@c @fcnindex{sldb-dispatch-extras}
3262@c @fcnindex{sldb-down}
3263@c @fcnindex{sldb-end-of-backtrace}
3264@fcnindex{sldb-eval-in-frame}
3265@c @fcnindex{sldb-exit}
3266@c @fcnindex{sldb-fetch-all-frames}
3267@c @fcnindex{sldb-fetch-more-frames}
3268@c @fcnindex{sldb-find-buffer}
3269@c @fcnindex{sldb-format-reference-node}
3270@c @fcnindex{sldb-format-reference-source}
3271@c @fcnindex{sldb-forward-frame}
3272@c @fcnindex{sldb-frame-details-visible-p}
3273@c @fcnindex{sldb-frame-locals}
3274@c @fcnindex{sldb-frame-number-at-point}
3275@c @fcnindex{sldb-frame-region}
3276@c @fcnindex{sldb-get-buffer}
3277@c @fcnindex{sldb-get-default-buffer}
3278@c @fcnindex{sldb-goto-last-frame}
3279@c @fcnindex{sldb-help-summary}
3280@c @fcnindex{sldb-hide-frame-details}
3281@c @fcnindex{sldb-highlight-sexp}
3282@c @fcnindex{sldb-insert-condition}
3283@c @fcnindex{sldb-insert-frame}
3284@c @fcnindex{sldb-insert-frames}
3285@c @fcnindex{sldb-insert-locals}
3286@c @fcnindex{sldb-insert-references}
3287@c @fcnindex{sldb-insert-restarts}
3288@c @fcnindex{sldb-inspect-condition}
3289@fcnindex{sldb-inspect-in-frame}
3290@c @fcnindex{sldb-inspect-var}
3291@c @fcnindex{sldb-invoke-restart}
3292@c @fcnindex{sldb-level}
3293@c @fcnindex{sldb-list-catch-tags}
3294@c @fcnindex{sldb-list-locals}
3295@c @fcnindex{sldb-lookup-reference}
3296@c @fcnindex{sldb-maybe-recenter-region}
3297@c @fcnindex{sldb-mode-hook}
3298@c @fcnindex{sldb-next}
3299@c @fcnindex{sldb-out}
3300@fcnindex{sldb-pprint-eval-in-frame}
3301@c @fcnindex{sldb-previous-frame-number}
3302@c @fcnindex{sldb-print-condition}
3303@c @fcnindex{sldb-prune-initial-frames}
3304@fcnindex{sldb-quit}
3305@c @fcnindex{sldb-reference-properties}
3306@c @fcnindex{sldb-restart-at-point}
3307@fcnindex{sldb-restart-frame}
3308@fcnindex{sldb-return-from-frame}
3309@c @fcnindex{sldb-setup}
3310@c @fcnindex{sldb-show-frame-details}
3311@c @fcnindex{sldb-show-frame-source}
3312@fcnindex{sldb-show-source}
3313@fcnindex{sldb-step}
3314@c @fcnindex{sldb-sugar-move}
3315@fcnindex{sldb-toggle-details}
3316@c @fcnindex{sldb-up}
3317@c @fcnindex{sldb-var-number-at-point}
3318@c @fcnindex{sldb-xemacs-emulate-point-entered-hook}
3319@c @fcnindex{sldb-xemacs-post-command-hook}
3320
3321
3322@c @fcnindex{inferior-slime-closing-return}
3323@c @fcnindex{inferior-slime-indent-line}
3324@c @fcnindex{inferior-slime-mode}
3325@c @fcnindex{inferior-slime-return}
3326@fcnindex{slime-abort-connection}
3327@fcnindex{slime-apropos}
3328@fcnindex{slime-apropos-all}
3329@fcnindex{slime-apropos-package}
3330@c @fcnindex{slime-arglist}
3331@fcnindex{slime-autodoc-mode}
3332@c @fcnindex{slime-autodoc-start-timer}
3333@c @fcnindex{slime-background-activities-enabled-p}
3334@c @fcnindex{slime-background-message}
3335@c @fcnindex{slime-browse-classes}
3336@c @fcnindex{slime-browse-xrefs}
3337@fcnindex{slime-call-defun}
3338@fcnindex{slime-calls-who}
3339@c @fcnindex{slime-check-coding-system}
3340@fcnindex{slime-close-all-sexp}
3341@fcnindex{slime-close-parens-at-point}
3342@fcnindex{slime-compile-and-load-file}
3343@fcnindex{slime-compile-defun}
3344@fcnindex{slime-compile-file}
3345@fcnindex{slime-compile-region}
3346@fcnindex{slime-compiler-macroexpand}
3347@fcnindex{slime-compiler-macroexpand-1}
3348@c @fcnindex{slime-compiler-notes-default-action-or-show-details}
3349@c @fcnindex{slime-compiler-notes-default-action-or-show-details/mouse}
3350@c @fcnindex{slime-compiler-notes-quit}
3351@c @fcnindex{slime-compiler-notes-show-details}
3352@c @fcnindex{slime-complete-form}
3353@fcnindex{slime-complete-symbol}
3354@fcnindex{slime-connect}
3355@fcnindex{slime-connection-list-make-default}
3356@c @fcnindex{slime-connection-list-mode}
3357@c @fcnindex{slime-copy-presentation-at-point}
3358@fcnindex{slime-describe-function}
3359@fcnindex{slime-describe-symbol}
3360@fcnindex{slime-disassemble-symbol}
3361@fcnindex{slime-disconnect}
3362@c @fcnindex{slime-documentation}
3363@fcnindex{slime-edit-definition}
3364@fcnindex{slime-edit-definition-other-frame}
3365@fcnindex{slime-edit-definition-other-window}
3366@fcnindex{slime-edit-definition-with-etags}
3367@fcnindex{slime-edit-value}
3368@c @fcnindex{slime-edit-value-commit}
3369@c @fcnindex{slime-edit-value-mode}
3370@fcnindex{slime-ensure-typeout-frame}
3371@c @fcnindex{slime-eval-buffer}
3372@fcnindex{slime-eval-defun}
3373@fcnindex{slime-eval-last-expression}
3374@c @fcnindex{slime-eval-print-last-expression}
3375@fcnindex{slime-eval-region}
3376@fcnindex{slime-fuzzy-abort}
3377@fcnindex{slime-fuzzy-complete-symbol}
3378@fcnindex{slime-fuzzy-completions-mode}
3379@c @fcnindex{slime-fuzzy-next}
3380@c @fcnindex{slime-fuzzy-prev}
3381@c @fcnindex{slime-fuzzy-select}
3382@c @fcnindex{slime-fuzzy-select/mouse}
3383@fcnindex{slime-goto-connection}
3384@fcnindex{slime-goto-xref}
3385@c @fcnindex{slime-handle-repl-shortcut}
3386@c @fcnindex{slime-highlight-notes}
3387@fcnindex{slime-hyperspec-lookup}
3388@c @fcnindex{slime-indent-and-complete-symbol}
3389@c @fcnindex{slime-init-keymaps}
3390@c @fcnindex{slime-insert-arglist}
3391@c @fcnindex{slime-insert-balanced-comments}
3392@fcnindex{slime-inspect}
3393@fcnindex{slime-inspector-copy-down}
3394@fcnindex{slime-inspector-describe}
3395@fcnindex{slime-inspector-next}
3396@c @fcnindex{slime-inspector-next-inspectable-object}
3397@fcnindex{slime-inspector-quit}
3398@c @fcnindex{slime-inspector-reinspect}
3399@fcnindex{slime-interactive-eval}
3400@fcnindex{slime-interrupt}
3401@fcnindex{slime-list-callees}
3402@fcnindex{slime-list-callers}
3403@c @fcnindex{slime-list-compiler-notes}
3404@fcnindex{slime-list-connections}
3405@c @fcnindex{slime-list-repl-shortcuts}
3406@fcnindex{slime-list-threads}
3407@fcnindex{slime-load-file}
3408@c @fcnindex{slime-load-system}
3409@fcnindex{slime-macroexpand-1}
3410@fcnindex{slime-macroexpand-1-inplace}
3411@fcnindex{slime-macroexpand-all}
3412@c @fcnindex{slime-make-default-connection}
3413@c @fcnindex{slime-make-typeout-frame}
3414@fcnindex{slime-mode}
3415@c @fcnindex{slime-next-location}
3416@fcnindex{slime-next-note}
3417@fcnindex{slime-nop}
3418@c @fcnindex{slime-ping}
3419@fcnindex{slime-pop-find-definition-stack}
3420@fcnindex{slime-pprint-eval-last-expression}
3421@c @fcnindex{slime-presentation-menu}
3422@c @fcnindex{slime-pretty-lambdas}
3423@fcnindex{slime-previous-note}
3424@fcnindex{slime-profile-package}
3425@fcnindex{slime-profile-report}
3426@fcnindex{slime-profile-reset}
3427@fcnindex{slime-profiled-functions}
3428@fcnindex{slime-quit}
3429@c @fcnindex{slime-quit-connection-at-point}
3430@c @fcnindex{slime-quit-lisp}
3431@c @fcnindex{slime-re-evaluate-defvar}
3432@c @fcnindex{slime-recompile-bytecode}
3433@c @fcnindex{slime-register-lisp-implementation}
3434@fcnindex{slime-reindent-defun}
3435@c @fcnindex{slime-remove-balanced-comments}
3436@fcnindex{slime-remove-notes}
3437@c @fcnindex{slime-repl}
3438@fcnindex{slime-repl-beginning-of-defun}
3439@fcnindex{slime-repl-bol}
3440@fcnindex{slime-repl-clear-buffer}
3441@fcnindex{slime-repl-clear-output}
3442@fcnindex{slime-repl-closing-return}
3443@c @fcnindex{slime-repl-compile-and-load}
3444@c @fcnindex{slime-repl-compile-system}
3445@c @fcnindex{slime-repl-compile/force-system}
3446@c @fcnindex{slime-repl-defparameter}
3447@fcnindex{slime-repl-end-of-defun}
3448@c @fcnindex{slime-repl-eol}
3449@c @fcnindex{slime-repl-load-system}
3450@c @fcnindex{slime-repl-load/force-system}
3451@c @fcnindex{slime-repl-mode}
3452@fcnindex{slime-repl-newline-and-indent}
3453@fcnindex{slime-repl-next-input}
3454@fcnindex{slime-repl-next-matching-input}
3455@fcnindex{slime-repl-next-prompt}
3456@c @fcnindex{slime-repl-pop-directory}
3457@c @fcnindex{slime-repl-pop-packages}
3458@fcnindex{slime-repl-previous-input}
3459@fcnindex{slime-repl-previous-matching-input}
3460@fcnindex{slime-repl-previous-prompt}
3461@c @fcnindex{slime-repl-push-directory}
3462@c @fcnindex{slime-repl-push-package}
3463@c @fcnindex{slime-repl-read-break}
3464@c @fcnindex{slime-repl-read-mode}
3465@fcnindex{slime-repl-return}
3466@fcnindex{slime-repl-set-package}
3467@c @fcnindex{slime-repl-shortcut-help}
3468@c @fcnindex{slime-reset}
3469@c @fcnindex{slime-restart-connection-at-point}
3470@c @fcnindex{slime-restart-inferior-lisp}
3471@c @fcnindex{slime-restart-inferior-lisp-aux}
3472@fcnindex{slime-scratch}
3473@c @fcnindex{slime-select-lisp-implementation}
3474@fcnindex{slime-selector}
3475@c @fcnindex{slime-send-sigint}
3476@c @fcnindex{slime-set-default-directory}
3477@c @fcnindex{slime-set-package}
3478@c @fcnindex{slime-show-xref}
3479@fcnindex{slime-space}
3480@c @fcnindex{slime-start-and-load}
3481@fcnindex{slime-switch-to-output-buffer}
3482@fcnindex{slime-sync-package-and-default-directory}
3483@c @fcnindex{slime-temp-buffer-mode}
3484@fcnindex{slime-temp-buffer-quit}
3485@c @fcnindex{slime-thread-attach}
3486@c @fcnindex{slime-thread-debug}
3487@c @fcnindex{slime-thread-control-mode}
3488@c @fcnindex{slime-thread-kill}
3489@c @fcnindex{slime-thread-quit}
3490@fcnindex{slime-toggle-profile-fdefinition}
3491@fcnindex{slime-toggle-trace-fdefinition}
3492@fcnindex{slime-undefine-function}
3493@fcnindex{slime-unprofile-all}
3494@fcnindex{slime-untrace-all}
3495@fcnindex{slime-update-connection-list}
3496@c @fcnindex{slime-update-indentation}                  ???
3497@fcnindex{slime-who-binds}
3498@fcnindex{slime-who-calls}
3499@fcnindex{slime-who-macroexpands}
3500@fcnindex{slime-who-references}
3501@fcnindex{slime-who-sets}
3502@fcnindex{slime-who-specializes}
3503@c @fcnindex{slime-xref-mode}
3504@c @fcnindex{slime-xref-quit}
3505@end table
3506
3507@end ignore
3508
3509@node Key Index
3510@unnumbered Key (Character) Index
3511@printindex ky
3512
3513@node Command Index
3514@unnumbered Command and Function Index
3515@printindex fn
3516
3517@node Variable Index
3518@unnumbered Variable and Concept Index
3519@printindex vr
3520
3521@bye
3522Local Variables:
3523paragraph-start: "@[a-zA-Z]+\\({[^}]+}\\)?[ \n]\\|[ ]*$"
3524paragraph-separate: "@[a-zA-Z]+\\({[^}]+}\\)?[ \n]\\|[ ]*$"
3525End:
3526