[Openmcl-devel] [CLSQL] Slime, CLSQL, and reader macros

Robert Cram robert at robertcramconstruction.com
Wed Mar 4 22:32:11 PST 2015


I realize that this is an old thread, but the issue just came up for me.  Perhaps it was answered or solved later, but I didn’t find so.

A fix of some sort, in some versions of Clozure and emacs/slime, is this line:

(setf clsql-sys::*original-readtable* nil)

which resets the clsql readtable caching mechanism, which is unaware of the slime/mcl/ccl thread-specific readtable issue.

Used like this:

;; Reset the mechanism.
(setf clsql-sys::*original-readtable* nil)

;; Alter the read table.
(clsql::enable-sql-reader-syntax)

;; Do whatever special syntax stuff you need to do:
(defun blah (blah)
  (clsql::select ‘blah
                 :where [= [ ‘blah ‘blah]
                 blah])
  )
;; Disable the syntax….

The point is that killing the cache needs to happen in the same evaluation as the code with the special syntax.

I make no claim except that the original error goes away.


Bob Cram
Robert Cram Construction
www.robertcramconstruction.com <http://www.robertcramconstruction.com/>
415-613-8319
robert at robertcramconstruction.com <mailto:robert at robertcramconstruction.com>
CA LIC 965300

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20150304/9b4dc66c/attachment.htm>


More information about the Openmcl-devel mailing list