[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eval-when-load?

From: Artur Malabarba
Subject: Re: eval-when-load?
Date: Thu, 16 Jul 2015 19:13:10 +0100

Is jde-jdhelper a macro? If it's a function the behavior you're asking
about is the default.

For instance, if I add (defvar oi (mapcar 'car nil)) to a file and
compile it, the byte-compiled file will be identical.

2015-07-16 17:33 GMT+01:00 Stephen Leake <address@hidden>:
> A project I'm working on has a form like this at top level in a file:
> (defvar jde-jdhelper-singleton (jde-jdhelper nil)
>   "The JDHelper singleton instance.")
> `jde-jdhelper' can throw an error, which it does during byte-compile (it
> complains about not finding "wget").
> We want the variable defined at load time, and we want the error at load
> time, but we don't care at compile time.
> So I'd like to do:
> (eval-when-load
>  (defvar jde-jdhelper-singleton (jde-jdhelper nil)
>    "The JDHelper singleton instance."))
> but `eval-when-load' is not defined.
> Is there a work-around?
> We could change the var to a function that checks if the initialization
> is done, but that seems a heavy solution.
> --
> -- Stephe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]