[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Avoiding 'reference to free variable' warnings while splitting elisp sou
From: |
Joe Riel |
Subject: |
Avoiding 'reference to free variable' warnings while splitting elisp source files |
Date: |
Sat, 23 Mar 2013 09:08:00 -0700 |
Is there a sane way to split the source of an elisp file
while avoiding the 'reference to free variable' warnings
when byte-compiling?
The problem arises when a variable defined in one file
is used in another. How does one avoid those errors?
I have half a dozen source files that are all required
by one package. A variable may be used in several files
(generally it is used mainly in one file, which is where
it is defined (with defvar), but, must be used in another.
I've tried adding
(eval-when-compile
(require 'other-source-file))
to avoid the error; that sort of works, but not
when two files each uses a variable defined in the other.
There has to be a better way.
--
Joe Riel
- Avoiding 'reference to free variable' warnings while splitting elisp source files,
Joe Riel <=
- RE: Avoiding 'reference to free variable' warnings while splittingelisp source files, Drew Adams, 2013/03/23
- Re: Avoiding 'reference to free variable' warnings while splittingelisp source files, Stefan Monnier, 2013/03/23
- RE: Avoiding 'reference to free variable' warnings whilesplittingelisp source files, Drew Adams, 2013/03/23
- Re: Avoiding 'reference to free variable' warnings whilesplittingelisp source files, Stefan Monnier, 2013/03/23
- RE: Avoiding 'reference to free variable' warningswhilesplittingelisp source files, Drew Adams, 2013/03/23
- Re: Avoiding 'reference to free variable' warningswhilesplittingelisp source files, Andreas Röhler, 2013/03/24
- RE: Avoiding 'reference to free variable' warningswhilesplittingelisp source files, Drew Adams, 2013/03/24