Ar an naoiú lá de mí na Nollaig, scríobh Stephen J. Turnbull:
Julian Bradfield writes:
> >[ load-time-value ] is *equivalent to progn* in interpreted (=
> >uncompiled) code, so it doesn’t quite do what you might expect.
>
> Ah, I see. The docstring is confusing: it says
> Documentation:
> Like `progn', but evaluates the body at load time.
> The result of the body appears to the compiler as a quoted constant.
>
> which suggests that it is, well, evaluated at load time!
>
> Perhaps it should be amended to: Like `progn', but evaluates the body
> at load time in byte-compiled code.
How does load-time-value differ from eval-when (with appropriate WHEN)?
The closest appropriate WHEN is :load-toplevel, and that’s limited to top
level forms, while load-time-value can be deep in a function or macro body
without problems.
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta