all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Pascal J. Bourguignon" <pjb@informatimago.com>
To: emacs-devel@gnu.org
Subject: Re: eval-when-compile
Date: Fri, 27 Jul 2012 10:11:27 +0200	[thread overview]
Message-ID: <87wr1pbp3k.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: CAJsNXTm0gZ1Di3=0NrP9r_qQFYNDNdq9DGsHeRiUzh5ARAu8BQ@mail.gmail.com

PJ Weisberg <pj@irregularexpressions.net> writes:

> On Thu, Jul 26, 2012 at 11:26 PM, Pascal J. Bourguignon
> <pjb@informatimago.com> wrote:
>> If you try to load the .el file directly, then the macro is not defined,
>> and you're trying to call a function named (ewc-macro) which will fail.
>
> That's incorrect.  Things inside the eval-when-compile get evaluated
> when the .el file is loaded, but not when the .elc file is loaded.
> It's *not* the equivalent of Common Lisp's (eval-when (compile)
> body...)

You're right, I misread C-h f eval-when-compile.  
Hence the importance of reading well the documentation!


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.




  reply	other threads:[~2012-07-27  8:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27  5:01 eval-when-compile Achim Gratz
2012-07-27  6:26 ` eval-when-compile Pascal J. Bourguignon
2012-07-27  7:41   ` eval-when-compile PJ Weisberg
2012-07-27  8:11     ` Pascal J. Bourguignon [this message]
2012-07-27 17:50   ` eval-when-compile Achim Gratz
2012-07-28  0:52     ` eval-when-compile Stephen J. Turnbull
2012-07-28  6:01       ` eval-when-compile Achim Gratz
2012-07-28 18:04     ` eval-when-compile PJ Weisberg
2012-08-08 18:51       ` eval-when-compile Achim Gratz
2012-08-08 21:13 ` eval-when-compile Johan Bockgård

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=87wr1pbp3k.fsf@kuiper.lan.informatimago.com \
    --to=pjb@informatimago.com \
    --cc=emacs-devel@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.