[slime-devel] Re: bit-vectors

Stas Boukarev stassats at gmail.com
Sat Aug 23 05:15:41 UTC 2008


On 8/22/08, Stas Boukarev <stassats at gmail.com> wrote:
> When I place cursor after special variable containing bit-vector,
>  slime tries to display it whole in minibuffer, which is slow and if
>  size of vector is very large it may crash slime:
>
>  (defparameter *foo* (make-array 20000000 :element-type 'bit))
>  *FOO*

The following patch should fix the problem. It's also possible to have
long symbols, but i think it's very uncommon.

Index: swank-arglists.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/contrib/swank-arglists.lisp,v
retrieving revision 1.21
diff -r1.21 swank-arglists.lisp
479,481c479,489
<           (let ((*print-pretty* nil) (*print-level* 4)
<                 (*print-length* 10) (*print-circle* t))
<              (format nil "~A => ~A" sym (symbol-value sym)))))))
---
>         (let ((*print-pretty* nil) (*print-level* 4)
>               (*print-length* 10) (*print-circle* t)
>               (value (symbol-value sym)))
>           (cond
>             ((and (or (bit-vector-p value) (stringp value))
>                   (> (length value) *print-length*))
>              (format nil "~A => ~A..." sym (subseq value 0 *print-length*)))
>             ((and (integerp value)
>                   (> value most-positive-fixnum))
>              (format nil "~A => ~F" sym value))
>             (t (format nil "~A => ~A" sym value))))))))

-- 
With Best Regards, Stas.



More information about the slime-devel mailing list