[Openmcl-devel] Error on macro character after sharpsign colon

Ron Garret ron at flownet.com
Wed Feb 3 23:41:56 UTC 2010


On Feb 3, 2010, at 7:13 AM, Gary Byers wrote:

> This is very long and likely overly cruel to dead horses, but there may be
> a simple solution at the bottom that'll let this thread die.
> 

[xnip]

> Wouldn't a simple solution be to shadow these functions in your readtable
> and let the original/standard versions do the heavy lifting with a standard
> readtable in effect ?
> 
> (defun shadowed-dispatch-macro-function (stream subchar numarg)
>  (let* ((*readtable* *copy-of-standard-readtable*))
>     (funcall (get-dispatch-macro-character #\# subchar) stream subchar numarg)))
> 
> (dolist (ch '(#\: #\b #\o #\x))
>  (set-dispatch-macro-character #\# ch #'shadowed-dispatch-macro-function *your-readtable*))
> 
> If I understand correctly, this provides a solution for your issue and Terje's,
> and doesn't involve debating whether wrong is right or not.

Works for me.  May this thread rest in peace.  :-)

rg




More information about the Openmcl-devel mailing list