unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* eval-when-compile  & cl
@ 2003-10-27 19:45 JD Smith
  2003-10-28 20:40 ` Richard Stallman
  2003-10-28 21:18 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: JD Smith @ 2003-10-27 19:45 UTC (permalink / raw)
  Cc: emacs-devel


A user testing a recent version of my IDLWAVE package found that 'cl is
not correctly loaded when referenced as:

(eval-when-compile (require 'cl))

This is a vestige from long ago, and I admit I'm not sure of the
intended function of eval-when-compile.  All versions of GNU Emacs I've
found seem to load cl implicitly, making it a moot point.  However, his
very new Emacs version did not.  Was this an intentional change?  Is
there a reason eval-when-compile wouldn't load cl, even for compiled
versions of the files?  He was able to remove the eval-when-compile to
get it working, but I'm not sure what advantages/disadvantages there are
to this solution.

Thanks,

JD

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: eval-when-compile  & cl
  2003-10-27 19:45 eval-when-compile & cl JD Smith
@ 2003-10-28 20:40 ` Richard Stallman
  2003-10-28 21:18 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2003-10-28 20:40 UTC (permalink / raw)
  Cc: emacs-devel, monnier+gnu/emacs

    This is a vestige from long ago, and I admit I'm not sure of the
    intended function of eval-when-compile.  All versions of GNU Emacs I've
    found seem to load cl implicitly, making it a moot point.

If they do so, it is a bug.  CL should not be loaded by running any of
the packages installed in emacs.  If you can tell me a precise test
case for such a problem, I will fix it.

The purpose of eval-when-compile is to make sure the file will not
load CL at runtime.  So please don't remove that.  Removing it would
introduce a bug of the above sort.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: eval-when-compile  & cl
  2003-10-27 19:45 eval-when-compile & cl JD Smith
  2003-10-28 20:40 ` Richard Stallman
@ 2003-10-28 21:18 ` Stefan Monnier
  2003-10-28 22:10   ` JD Smith
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2003-10-28 21:18 UTC (permalink / raw)
  Cc: emacs-devel, Stefan Monnier

> A user testing a recent version of my IDLWAVE package found that 'cl is
> not correctly loaded when referenced as:
> (eval-when-compile (require 'cl))

The above code only ensures the package is loaded during compilation,
so it is useful if you use CL macros but is of no help for CL functions.


        Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: eval-when-compile  & cl
  2003-10-28 21:18 ` Stefan Monnier
@ 2003-10-28 22:10   ` JD Smith
  0 siblings, 0 replies; 4+ messages in thread
From: JD Smith @ 2003-10-28 22:10 UTC (permalink / raw)
  Cc: emacs-devel

On Tue, 2003-10-28 at 14:18, Stefan Monnier wrote:
> > A user testing a recent version of my IDLWAVE package found that 'cl is
> > not correctly loaded when referenced as:
> > (eval-when-compile (require 'cl))
> 
> The above code only ensures the package is loaded during compilation,
> so it is useful if you use CL macros but is of no help for CL functions.

Thanks for the explanation, Stefan.  It sounds like it would be
preferred to avoid loading 'cl.  I found out that most RedHat
distributions load 'cl via various bundled site-lisp files, hence my
confusion regarding its implicit loading.  What is the recommendation on
the use of 'cl functions?  

JD

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-28 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27 19:45 eval-when-compile & cl JD Smith
2003-10-28 20:40 ` Richard Stallman
2003-10-28 21:18 ` Stefan Monnier
2003-10-28 22:10   ` JD Smith

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).