[Antik-devel] Sharp-m reader macro ignores *read-suppress* (+ patch)
Liam Healy
lhealy at common-lisp.net
Sat Apr 28 17:32:37 UTC 2012
This makes sense, thanks. I've applied the patch to the cffi-libffi branch.
Liam
On Wed, Apr 18, 2012 at 11:27 AM, Martin Schmauder <
martinschmauder at googlemail.com> wrote:
> Hi,
>
> I have encountered a problem with the sharp-m reader macro function.
>
> The sharp-m reader macro function (lambda in grid/functions.lisp,
> l. 202) uses the function cl:read-delimited-list to read the macro
> arguments. However, when cl:*read-suppress* is true,
> read-delimited-list always returns nil (See *read-suppress* in CLHS.)
> That value is then (wrongly) passed to grid:check-initial-contents,
> which (rightly) signals the error "Initial-contents specified as
> NIL."
>
> The following code can be used to observe the behaviour. No matter
> what (valid or invalid) code is inside the sharp-m parentheses, the
> error will be signaled.
>
> (let ((*read-suppress* t))
> (with-input-from-string (stream "#m(1 2 3)")
> (read stream)))
>
> The solution is to call read-delimited-list and then check if we have
> to ignore its return value with "(unless *read-suppress* ...)". Patch
> attached.
>
> By the way, how I encountered this issue: When I compile a file with
> C-c C-k and the compilation yields warnings or notes, the Slime/SBCL
> combination seems to re-read the file with *read-suppress*. Any
> sharp-m macro that is then read triggers the error. Try with:
> #m(1 2 3)
> (defun foo (bar)) ; unused variable style-warning
>
>
> Comments?
>
> Martin
>
>
> _______________________________________________
> Antik-devel mailing list
> Antik-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/antik-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/antik-devel/attachments/20120428/a668333a/attachment.html>
More information about the antik-devel
mailing list