REPL (SLIME User Manual, version 2.28)

### 8.2 REPL: the “top level”

SLIME uses a custom Read-Eval-Print Loop (REPL, also known as a “top level”, or listener). The REPL user-interface is written in Emacs Lisp, which gives more Emacs-integration than the traditional `comint`-based Lisp interaction:

- Conditions signalled in REPL expressions are debugged with SLDB.
- Return values are distinguished from printed output by separate Emacs faces (colours).
- Emacs manages the REPL prompt with markers. This ensures that Lisp output is inserted in the right place, and doesn’t get mixed up with user input.

To load the REPL use `(add-to-list 'slime-contribs 'slime-repl)` in your `.emacs`.

`C-c C-z` ¶
`M-x slime-switch-to-output-buffer`

  Select the output buffer, preferably in a different window.

`C-c C-y` ¶
`M-x slime-call-defun`

  Insert a call to the function defined around point into the REPL.

`C-c C-j` ¶
`M-x slime-eval-last-expression-in-repl`

  Inserts the last expression to the REPL and evaluates it there. Switches to the current package of the source buffer for the duration. If used with a prefix argument, doesn’t switch back afterwards.