using (in-readtable) to select a readtable

73budden . budden73 at gmail.com
Sun Aug 9 19:21:35 UTC 2015


Hi!

Problem is that when you issue (in-readtable) form, it can alter
*readtable-alist*.
E.g. let's assume that :foo package is assicitated to :foo-readtable.
Then consider the following call sequence in REPL:

(in-package :foo)
(in-readtable :bar-readtable)

Then :foo package is associated to bar-readtable.

Also, if there are two source files where package is the same while
readtables are different between the files, readtable associtated to
package changes implicitly as a side-effect of file compilation or
loading. E.g. this can occur after we edit either file and then load
asdf system which contains both files. Then consider we are going to
SLIME REPL and do (in-package). Then we assume that readtable changed
implicitly, but it can change to value from either file, in dependence
of our editing activity.

*lock-readtable-alist* would protect from this situation.



More information about the slime-devel mailing list