all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: About cl-lib and `eval-when-compile'
Date: Thu, 21 Feb 2013 21:33:37 -0500	[thread overview]
Message-ID: <jwvppztyt8u.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: 20130221163548.e452c0c30668bfdecc723b60@gmail.com

> Since the old `cl.el' does not use a clean namespace, Emacs has a
> policy that packages distributed with Emacs must not load `cl' at run
> time.  If I use the new cl-lib library, do I have to use
> `eval-when-compile'?  Can anybody help?  Thanks.

There's a misunderstanding: there was never any particular need to use
`eval-when-compile' with CL.  What there was is that CL was tolerated
only if used at compile-time (i.e. you could use its macros, but not
its functions).
There's no such problem with `cl-lib', so you can require `cl-lib' both
within or without `eval-when-compile'.  If you only use `cl-lib' macros,
then it's much better to wrap it in `eval-when-compile' so that cl-lib
won't unnecessarily be loaded when you use the package.


        Stefan




      reply	other threads:[~2013-02-22  2:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21  8:35 About cl-lib and `eval-when-compile' Xue Fuqiao
2013-02-22  2:33 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvppztyt8u.fsf-monnier+gmane.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.