Subject: An interesting puzzle, or bug in CLISP?

From: Marcus Daniels <[email-masked]>
Date: Tue, 18 Jul 1995 00:28:26 GMT

>>>>> "Mark" == M Thomas <[email-masked]> writes:

Mark> Now suppose I modify the PRINT-OBJECT method very slightly,
Mark> replacing the format directive `~C' by the format directive
Mark> `~A'. The result is a file I'll call `bad.lsp'.

I don't get this ~C/~A problem with 1995-06-23.  I see it quoted
in the .fas file.

Mark> The punch line is that the _interpreted_ versions `good.lsp' and
Mark> `bad.lsp' both work, but the _compiled_ version `bad.fas' is
Mark> incorrect.  Apparently the Lisp constant object denoted by !(a b
Mark> c) in the source code `bad.lsp' is stored incorrectly in
Mark> `bad.fas', resulting in the following misbehavior:

For me, your '!(a b c) example doesn't compile without errors.
Would something like this do what you want?

(set-macro-character 
 #\!
 #'(lambda (s c)
     `(make-instance 'foo :char ,c :form ',(read s T NIL T))
     ))