[slime-devel] Re: slime-edit-definition woes

Nikodemus Siivola tsiivola at cc.hut.fi
Sun Mar 6 09:54:06 UTC 2005


On Sat, 5 Mar 2005, Luke Gorrie wrote:

> NB: I want buffer-local syntax as much as the next guy but I think
> this clsql #.(hack-read-syntax) ... #.(unhack-read-syntax) trick is a
> bit fragile -- I don't think that tools like SLIME or the CMUCL
> debugger can really do the right thing with it.

In the direction of decrasing fragility:

  1. Instead of #.(HACK) one should do

     (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) (HACK))

     ...which would be the macroexpansion of an (IN-SYNTAX :FOO) form.

  2. Doing (SETF *READTABLE* (FIND-READTABLE :FOO)) instead of hacking
     the current one is safer: LOAD and COMPILE-FILE bind *READTABLE*,
     but by identity it's still the same one.

  3. Perhaps most importantly, in the absence of a semi-standard
     IN-SYNTAX/FIND-READTABLE extension the only thing that can allow
     environments like Slime to do the even approximately the right thing
     is using #-style custom read-syntax instead of plain brackets or
     whatever, as that will signal a read-error which the environment can
     try to handle.

Just my 0.02EUR

Cheers,

  -- Nikodemus              Schemer: "Buddha is small, clean, and serious."
                   Lispnik: "Buddha is big, has hairy armpits, and laughs."



More information about the slime-devel mailing list