help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About `cl-load-time-value'


From: Barry Margolin
Subject: Re: About `cl-load-time-value'
Date: Sat, 02 Feb 2013 12:04:45 -0500
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.18842.1359801098.855.help-gnu-emacs@gnu.org>,
 Xue Fuqiao <xfq.free@gmail.com> wrote:

> In the trunk version of (info "(cl) Time of Evaluation"):
> 
>      In a compiled file, `cl-load-time-value' arranges for FORM to be
>      evaluated when the `.elc' file is loaded and then used as if it
>      were a quoted constant.  In code compiled by `byte-compile' rather
>      than `byte-compile-file', the effect is identical to
>      `eval-when-compile'.
> 
> Why is the code compiled by `byte-compile' and `byte-compile-file'
> being treated different?  Can anybody help?  Thanks.

Because when you use byte-compile, you're not creating a file, and "when 
the .elc file is loaded" doesn't exist.  So it evaluates it immediately 
and puts the value in the compiled function.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]