[slime-devel] Broken readtables

Alain.Picard at memetrics.com Alain.Picard at memetrics.com
Thu Jun 17 06:49:52 UTC 2004


I have a file which defines a readtable so I can type
things like #v(1 2).  (Don't ask.  :-)

When I hit M-. to find any definition in this file, emacs
croaks and asks if I want to enter recursive edit.  Saying
yes yields a SLDB buffer like this:

    Subcharacter #\v not defined for dispatch char #\#.
       [Condition of type CONDITIONS:SIMPLE-READER-ERROR]

    Restarts:
      0: [ABORT] Abort handling SLIME request.
      1: [ABORT] Quit process.

Now, I grovelled a bit in the sources and found:
  (defvar *readtable-alist* '()
    "An alist mapping package names to readtables.")

I tried to use this thusly:

Try to add what I think is reasonable to this alist
    CL-USER> (push (cons "GRAPHICS" *readtable*) swank::*readtable-alist*)
    (("GRAPHICS" . #<READTABLE 202E1B84>))

Verify that it finds the right package
    CL-USER> (swank::guess-buffer-readtable "graphics")
    #<READTABLE 202E1B84>

Make sure the correct table is in place:
    CL-USER> (get-dispatch-macro-character #\# #\v (swank::guess-buffer-readtable "graphics"))
    #<function GRAPHICS::VECTOR-READER 237CF9D2>
(looks good).

However, the next M-. failed in exactly the same way.

Tracing GUESS-BUFFER-READTABLE, I found it was in fact calling it
with argument ":graphics", which I thought sub-optimal, but, no matter:
    CL-USER> (push (cons ":graphics" *readtable*) swank::*readtable-alist*)
    ((":graphics" . #<READTABLE 202E1B84>) ("GRAPHICS" . #<READTABLE 202E1B84>))

Now, surely it will work, right?  Nope.  Any clues?

	    Cheers,
			--ap




More information about the slime-devel mailing list