![](https://secure.gravatar.com/avatar/237d1bf918c93956bf69905b7bf591df.jpg?s=120&d=mm&r=g)
Martin Simmons <martin@xanalys.com> writes:
I made it use WITH-STANDARD-IO-SYNTAX originally to get all the standard bindings, in particular you must also bind *PACKAGE* because the function sets it. There is also *READ-BASE*, *READ-DEFAULT-FLOAT-FORMAT* and *READ-SUPPRESS* to consider.
True, plus any other implementation-defined reader setting (I don't know if LispWorks has any). I particularly hadn't realised that with-standard-io-syntax was binding *package*. I hacked it to use a `with-fairly-standard-io-syntax' macro. This does with-standard-io-syntax but then rebinds *package* and *readtable* as they were before executing the body. Sound reasonable?
What binds *READTABLE* when you do M-. anyway? It doesn't seem to be bound for me when DSPEC-STREAM-POSITION is reached via FIND-DEFINITIONS-FOR-EMACS.
[Just read the *readtable-alist* code for the first time.] Nobody sets it for definition-finding. That's reasonable in swank.lisp since it doesn't know what package the definition will be in. Perhaps ideal would be for dspec-stream-position to set the right readtable (from *readtable-alist*) when it sees IN-PACKAGE. I'm not sure if the other backends can/should do this too. We'd have to move *readtable-alist* into swank-backend.lisp. But I suspect the main issue right now is to make sure that a custom-hacked readtable that one installs globally as *READTABLE* will be used by `M-.'. That's how I do my readtable'ery, at least. P.S., Helmut, I think I was sleeping when *readtable-alist* when in. Could you post a snippet of how it's supposed to be used? Cheers, Luke