[Openmcl-devel] Side effects when redefining dispatching reader macro?
gb at clozure.com
Thu Nov 12 14:27:57 PST 2015
On 11/12/2015 11:37 AM, Ron Garret wrote:
> (MAKE-DISPATCH-MACRO-CHARACTER #\# NIL*readtable*)
CLHS says (of MAKE-DISPATCH-MACRO-CHARACTER) that,
"Initially, every /character/
in the dispatch table associated with the /char/ has an associated
function that signals an error of /type/
In the body of your message, you seemed to expect #' to have retained
its original definition.
If the term "... makes char be a dispatching-macro-character ..." is
read as "does nothing if the character is already defined as a
dispatching-macro, else ...",
your expectation is reasonable. I am probably more accustomed to the
behavior that that you said that you get in 1.10, but both expectations
Portable code could avoid the issue by calling
GET-DISPATCH-MACRO-CHARACTER and only calling
MAKE-DISPATCH-MACRO-CHARACTER if the character is not already defined as
a dispatching macro. I don't know what the library that the original
poster mentioned does. or what version of that library they are using.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel