[Top][All Lists]

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


From: Stephen Leake
Subject: eval-when-load?
Date: Thu, 16 Jul 2015 11:33:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

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:

 (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]