6.2.2 Other configurables

These Lisp variables can be configured via your ~/.swank.lisp file:

SWANK:*CONFIGURE-EMACS-INDENTATION*

This variable controls whether indentation styles for &body-arguments in macros are discovered and sent to Emacs. It is enabled by default.

SWANK:*GLOBALLY-REDIRECT-IO*

When T this causes the standard streams (*standard-output*, etc) to be globally redirected to the REPL in Emacs.

When :STARTED-FROM-EMACS (default) redirects the output when the lisp is launched from emacs (i.e. M-x slime), but not from M-x slime-connect.

When NIL these streams are only temporarily redirected to Emacs using dynamic bindings while handling requests. Note that *standard-input* is currently never globally redirected into Emacs, because it can interact badly with the Lisp’s native REPL by having it try to read from the Emacs one.

SWANK:*GLOBAL-DEBUGGER*

When true (the default) this causes *DEBUGGER-HOOK* to be globally set to SWANK:SWANK-DEBUGGER-HOOK and thus for SLIME to handle all debugging in the Lisp image. This is for debugging multithreaded and callback-driven applications.

SWANK:*SLDB-QUIT-RESTART*

This variable names the restart that is invoked when pressing q (see sldb-quit) in SLDB. For SLIME evaluation requests this is unconditionally bound to a restart that returns to a safe point. This variable is supposed to customize what q does if an application’s thread lands into the debugger (see SWANK:*GLOBAL-DEBUGGER*).

(setf swank:*sldb-quit-restart* 'sb-thread:terminate-thread)
SWANK:*BACKTRACE-PRINTER-BINDINGS*
SWANK:*MACROEXPAND-PRINTER-BINDINGS*
SWANK:*SLDB-PRINTER-BINDINGS*
SWANK:*SWANK-PPRINT-BINDINGS*

These variables can be used to customize the printer in various situations. The values of the variables are association lists of printer variable names with the corresponding value. E.g., to enable the pretty printer for formatting backtraces in SLDB, you can use:

(push '(*print-pretty* . t) swank:*sldb-printer-bindings*).
SWANK:*LOG-EVENTS*

Setting this variable to t causes all protocol messages exchanged with Emacs to be printed to *TERMINAL-IO*. This is useful for low-level debugging and for observing how SLIME works “on the wire.” The output of *TERMINAL-IO* can be found in your Lisp system’s own listener, usually in the buffer *inferior-lisp*.