[slime-devel] please no sharpsign references in C-c RET output

Chisheng Huang cph at chi-square-works.com
Tue Mar 15 17:22:43 UTC 2005


> The #<number>=<object> ... #<number># syntax is a result of setting a
> printer variable, such as *PRINT-CIRCLE* to some non-NIL value. It
> gives the Lisp printer the ability to print (possibly readably)
> objects which have circular structure (e.g. a linked-list node with a
> pointer to itself) without looping indefinitely (which, you will
> agree, should probably be avoided).
>
> However, unless you're working with self-referencing data structures,
> having *PRINT-CIRCLE* set to something non-NIL can be more of an
> annoyance than anything else.
>
> So, (1) are you sure you haven't set *PRINT-CIRCLE* to some non-NIL
> value? (2) Try setting it to NIL and re-running C-c RET. Does that
> help?

I only mess with *PRINT-CIRCLE* when I'm printing circular data
structures.  

Another Slime user kindly sent me the following message posted to the
mailing list a few days ago:

>> ... and I wonder if the macroexpand could bind *print-circle* to nil
>> so that the macroexpansion command does not show a sexp full of #n=
>> and #n# that I find harder to understand.  OTOH, it allows us to see
>> structure sharing in the code but that doesn't seem to be terribly
>> useful...
>
> You can do something like this:
>
>   (setf (cdr (assoc '*print-circle* swank:*swank-pprint-bindings*)) nil)
>
> I haven't noticed #n# problems with CMUCL but I don't macroexpand all
> that often.

It never occurs to me that Slime might rebind *PRINT-CIRCLE* dynamically 
behind my back when doing macro expansion.  By the way, I'm using CMUCL.

Thanks.

-cph





More information about the slime-devel mailing list