<div class="gmail_extra">This makes sense, thanks.  I've applied the patch to the cffi-libffi branch.<br><br>Liam<br><br><div class="gmail_quote">On Wed, Apr 18, 2012 at 11:27 AM, Martin Schmauder <span dir="ltr"><<a href="mailto:martinschmauder@googlemail.com" target="_blank">martinschmauder@googlemail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have encountered a problem with the sharp-m reader macro function.<br>
<br>
The sharp-m reader macro function (lambda in grid/functions.lisp,<br>
l. 202) uses the function cl:read-delimited-list to read the macro<br>
arguments. However, when cl:*read-suppress* is true,<br>
read-delimited-list always returns nil (See *read-suppress* in CLHS.)<br>
That value is then (wrongly) passed to grid:check-initial-contents,<br>
which (rightly) signals the error "Initial-contents specified as<br>
NIL."<br>
<br>
The following code can be used to observe the behaviour. No matter<br>
what (valid or invalid) code is inside the sharp-m parentheses, the<br>
error will be signaled.<br>
<br>
(let ((*read-suppress* t))<br>
  (with-input-from-string (stream "#m(1 2 3)")<br>
    (read stream)))<br>
<br>
The solution is to call read-delimited-list and then check if we have<br>
to ignore its return value with "(unless *read-suppress* ...)". Patch<br>
attached.<br>
<br>
By the way, how I encountered this issue: When I compile a file with<br>
C-c C-k and the compilation yields warnings or notes, the Slime/SBCL<br>
combination seems to re-read the file with *read-suppress*. Any<br>
sharp-m macro that is then read triggers the error. Try with:<br>
#m(1 2 3)<br>
(defun foo (bar)) ; unused variable style-warning<br>
<br>
<br>
Comments?<br>
<span class="HOEnZb"><font color="#888888"><br>
Martin<br>
<br>
</font></span><br>_______________________________________________<br>
Antik-devel mailing list<br>
<a href="mailto:Antik-devel@common-lisp.net">Antik-devel@common-lisp.net</a><br>
<a href="http://lists.common-lisp.net/cgi-bin/mailman/listinfo/antik-devel" target="_blank">http://lists.common-lisp.net/cgi-bin/mailman/listinfo/antik-devel</a><br>
<br></blockquote></div><br></div>