[slime-devel] Re: SWANK and *read-eval*

Matthias Koeppe mkoeppe+slime at mail.math.uni-magdeburg.de
Mon Aug 27 01:47:46 UTC 2007


"Tobias C. Rittweiler" <tcr at freebits.de> writes:

> Matthias Koeppe <mkoeppe+slime at mail.math.uni-magdeburg.de> writes:
>
>> As I explained before, we cannot use READ in the context of autodoc
>> anyway because of interning.
>
> I just committed my changes to remedy the interning. It does still fall
> back to READ. The benefit is that this also fixes interning for
> `slime-complete-form' at once --- which until now always interned
> everything.

The solution in the new version of READ-FORM-SPEC is not sufficient,
because it does not handle symbols interned in nested forms.

I type:

        (defmethod (tyy zzz) abcd ...

now (SWANK::READ-FORM-SPEC ("(tyy zzz)")) gets called,
and returns values ((TYY ZZZ)) NIL.  

Now:

(find-symbol "TYY")
TYY
:INTERNAL

In general the "destroy-and-repair" (here: "intern-and-unintern")
method is not giving a clean implementation.

As I said, you simply cannot use READ in the context of autodoc.

What you need to do -- if you want to use your proposed protocol of
sending forms to SWANK -- is implement a limited reader in
READ-FORM-SPEC.  It only needs to handle lists, numbers, strings, and
symbols to be useful in this context.  It should never intern symbols
and gracefully handle what would be a reader error for READ.  It
should not be very hard to write; give it a try.

Matthias
-- 
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe
(currently @math.ucdavis.edu)




More information about the slime-devel mailing list