[parenscript-devel] help: question about eval-when usage
Vladimir Sedach
vsedach at gmail.com
Fri Jan 20 22:03:53 UTC 2012
Hi,
It is indeed an omission in the reference manual - EVAL-WHEN is a
supported Parenscript form. I will add it to the manual soon.
EVAL-WHEN in Parenscript has the following meaning:
The code in BODY is assumed to be Common Lisp code
in :compile-toplevel and :load-toplevel sitations, and Parenscript
code in :execute
So for example, this is how the Parenscript macro IN-PACKAGE is defined:
(defpsmacro in-package (package-designator)
`(eval-when (:compile-toplevel)
(in-package ,package-designator)))
It just executes CL code - handy when you're writing .paren files that
only have Parenscript code.
Vladimir
On Thu, Jan 19, 2012 at 10:44 PM, Canhua <dreameration at gmail.com> wrote:
> I am reading codes of paren-util. I find that it use "eval-when"
> inside defpsmacro.
> But I don't find that parenscript reference says eva-when is supported.
> As I understand, defpsmacro should expand into a valid parenscript code. Does
> parenscript support eval-when that although doesn't appear in reference.
>
> Thanks.
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
More information about the parenscript-devel
mailing list