2

When I enter this at the REPL prompt:

(setf (readtable-case *readtable*) :invert)

I get this error message:

Error in SETF [or a callee]: Cannot expand the SETF form (READTABLE-CASE
                                                          *READTABLE*).

Why do I get this error?

Daniel Jour
  • 15,896
  • 2
  • 36
  • 63
Roger Costello
  • 3,007
  • 1
  • 22
  • 43
  • 4
    Which implementation are you using? – Daniel Jour Nov 21 '15 at 15:05
  • 1
    What'should the current package when you're evaluating this form? Any chance is not cl:readtable-case that you're writing? – Joshua Taylor Nov 21 '15 at 15:28
  • I am using something called the LispIDE – Roger Costello Nov 21 '15 at 17:58
  • 2
    What does `(format nil "~A ~A" (lisp-implementation-type) (lisp-implementation-version))` say? And what's the result of `(eq 'readtable-case 'cl:readtable-case)`? What's the current package, in which your `setf` form is read and evaluated? – Dirk Nov 21 '15 at 19:12
  • (format nil "~A ~A" (lisp-implementation-type) (lisp-implementation-version)) says "Kyoto Common Lisp GCL 2.6.2". The result of (eq 'readtable-case 'cl:readtable-case) is T. What does this all mean please? – Roger Costello Nov 21 '15 at 20:02
  • That `setf` expression may fail [if `*readtable*` is the standard readtable](http://www.lispworks.com/documentation/HyperSpec/Body/02_aab.htm), only [obtainable through the `with-standard-io-syntax` macro](http://www.lispworks.com/documentation/HyperSpec/Body/m_w_std_.htm). – acelent Nov 23 '15 at 22:52

1 Answers1

3

(format nil "~A ~A" (lisp-implementation-type) (lisp-implementation-version)) says "Kyoto Common Lisp GCL 2.6.2". The result of (eq 'readtable-case 'cl:readtable-case) is T. What does this all mean please?

The second expression means you're using the correct symbol. The first indicates which Lisp implementation you're using: That should be GNU Common Lisp 2.6.2

After some search I found this message on the gcl-devel list saying ...

The problem appears to be this line:

(setf (readtable-case *readtable*) readcase)

in randomly-check-readability. I'd recommend this as the next ansi issue to resolve, since it's blocking the tests.

... with a subject line "ansi-tests in 2.7.0". The message is from 2004.

Bottom line: I guess you need a more recent or even* a different Lisp implementation.

(* as mentioned by Rainer Joswig the issue also affects the current 2.6.12 release)


I guess all major Lisp implementations support this. CLISP 2.49 does, SBCL and CCL probably do, as far as I know ECL does also.

Community
  • 1
  • 1
Daniel Jour
  • 15,896
  • 2
  • 36
  • 63