[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp's cl package. Don't understand the notice about eval-when-comp
From: |
Michael Ekstrand |
Subject: |
Re: elisp's cl package. Don't understand the notice about eval-when-compile |
Date: |
Tue, 24 Mar 2009 23:42:47 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
Xah Lee <xahlee@gmail.com> writes:
> in emacs lisp's CL package documentation “(info "(cl)Overview")”, it
> has this passage:
>
> *Please note:* the "CL" functions are not standard parts of the
> Emacs Lisp name space, so it is legitimate for users to define them
> with other, conflicting meanings. To avoid conflicting with those
> user
> activities, we have a policy that packages installed in Emacs must not
> load "CL" at run time. (It is ok for them to load "CL" at compile
> time
> only, with `eval-when-compile', and use the macros it provides.) If
> you are writing packages that you plan to distribute and invite
> widespread use for, you might want to observe the same rule.
>
> I don't quite understand it.
>
> If i distribute a package xyz.el, which calls
>
> (eval-when-compile (require 'cl))
>
> And, this package does not require users to byte-compile it. Then,
> how's the eval-when-compile solve the name conflict problem?
>
> does it imply that if you distribute a package using cl, it must be
> byte compiled eventually?
No, it just implies that if you distribute a package using cl, and you
want to be nice to your users, you will follow the guideline (only use
macros and put the require in eval-when-compile) and include a warning
or notice with the package that loading it directly from source will
import the cl package. If this bothers them then they can byte compile
it.
Most substantial third-party packages for Emacs that I have come across
have an installation mechanism, frequently via some form of Makefile,
which performs byte-compilation, so it isn't an issue there.
- Michael
--
mouse, n: A device for pointing at the xterm in which you want to type.
Confused by the strange files? I cryptographically sign my messages.
For more information see <http://www.elehack.net/resources/gpg>.