* About `cl-load-time-value'
@ 2013-02-02 10:31 Xue Fuqiao
0 siblings, 0 replies; 3+ messages in thread
From: Xue Fuqiao @ 2013-02-02 10:31 UTC (permalink / raw)
To: help-gnu-emacs
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.
--
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: About `cl-load-time-value'
[not found] <mailman.18842.1359801098.855.help-gnu-emacs@gnu.org>
@ 2013-02-02 17:04 ` Barry Margolin
2013-02-04 2:47 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Barry Margolin @ 2013-02-02 17:04 UTC (permalink / raw)
To: help-gnu-emacs
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 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: About `cl-load-time-value'
[not found] <mailman.18842.1359801098.855.help-gnu-emacs@gnu.org>
2013-02-02 17:04 ` About `cl-load-time-value' Barry Margolin
@ 2013-02-04 2:47 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2013-02-04 2:47 UTC (permalink / raw)
To: help-gnu-emacs
> Why is the code compiled by `byte-compile' and `byte-compile-file'
> being treated different? Can anybody help? Thanks.
The best help I can give is to stay away from it, because if you look at
the implementation, you'll see it's so hackish that you won't want to
depend on it,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-04 2:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.18842.1359801098.855.help-gnu-emacs@gnu.org>
2013-02-02 17:04 ` About `cl-load-time-value' Barry Margolin
2013-02-04 2:47 ` Stefan Monnier
2013-02-02 10:31 Xue Fuqiao
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.