[slime-devel] Set *print-right-margin* depending on width of repl window (in slime-repl contrib)

Helmut Eller heller at common-lisp.net
Thu Nov 22 21:08:17 UTC 2012


On Thu, Nov 22 2012, Marco Baringer wrote:

> hi,
>
>   The attached patch sets (binds) cl:*print-right-margin*, when
>   evaluating a form from the repl via slime-repl-eval-string, to the
>   width of the repl window.
>
>   Not a big deal, but does make describe's output much cleaner (thanks
>   to H4ans in #lisp for the inspiration).
[...]
> +           `(cl:let ((cl:*print-right-margin* ,(with-current-buffer (slime-output-buffer)
> +                                                 (window-width))))
> +              (swank:listener-eval ,string))
> +           `(swank:listener-eval ,string))

It would be better to make window-width an argument of
swank:listener-eval than to send code snippets.  Code snippets are a
problem for non-CL backends, e.g. for Clojure.

Helmut






More information about the slime-devel mailing list