Previous: , Up: Lisp-side   [Contents][Index]


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:*USE-DEDICATED-OUTPUT-STREAM*

This variable controls whether to use an unsafe efficiency hack for sending printed output from Lisp to Emacs. The default is nil, don’t use it, and is strongly recommended to keep.

When t, a separate socket is established solely for Lisp to send printed output to Emacs through, which is faster than sending the output in protocol-messages to Emacs. However, as nothing can be guaranteed about the timing between the dedicated output stream and the stream of protocol messages, the output of a Lisp command can arrive before or after the corresponding REPL results. Thus output and REPL results can end up in the wrong order, or even interleaved, in the REPL buffer. Using a dedicated output stream also makes it more difficult to communicate to a Lisp running on a remote host via SSH (see Connecting to a remote lisp).

SWANK:*DEDICATED-OUTPUT-STREAM-PORT*

When *USE-DEDICATED-OUTPUT-STREAM* is t the stream will be opened on this port. The default value, 0, means that the stream will be opened on some random port.

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*.


Previous: , Up: Lisp-side   [Contents][Index]