I'm confused about an eval-when in cl-info.lisp with GCL
Subject: I'm confused about an eval-when in cl-info.lisp with GCL
From: James Amundson
Date: Fri, 23 Jul 2004 10:02:44 -0500
I'm confused about some behavior I see in cl-info.lisp under GCL.
cl-info.lisp contains the following snippet:
----------------------------------------------------------------
(eval-when (compile eval)
(defmacro while (test &body body)
`(loop while ,test do ,@ body))
#+nil
(defmacro f (op x y)
`(,op (the fixnum ,x) (the fixnum ,y))))
----------------------------------------------------------------
When I use cl-info with GCL, I get:
----------------------------------------------------------------
(%i1) ? plot_options
Maxima encountered a Lisp error:
Error in WHEN [or a callee]: The function CL-INFO::WHILE is undefined.
----------------------------------------------------------------
CMUCL and Clisp work fine. I can fix the problem by changing the snippet
to
----------------------------------------------------------------
#+gcl
(defmacro while (test &body body)
`(loop while ,test do ,@ body))
(eval-when (compile eval)
#-gcl
(defmacro while (test &body body)
`(loop while ,test do ,@ body))
#+nil
(defmacro f (op x y)
`(,op (the fixnum ,x) (the fixnum ,y))))
----------------------------------------------------------------
I don't understand why I should have to do this, however. Any insight
would be appreciated.
--Jim