unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Pascal J. Bourguignon" <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Avoiding 'reference to free variable' warnings while splitting elisp source files
Date: Sat, 23 Mar 2013 17:59:11 +0100	[thread overview]
Message-ID: <87k3oynjc0.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: 87mwtuoy9p.fsf@gmail.com

Jay Belanger <jay.p.belanger@gmail.com> writes:

>>>> 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?
>>>
>>> You can put
>>> (defvar variable-name)
>>> in the other file.
>>
>> Nope.  Because then the initialization depends on the order of loading
>> the files.
>
> If there is no initial value in the defvar, then the only thing the
> defvar does is quiet the compiler.

Right.  I was confused.

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


  reply	other threads:[~2013-03-23 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.22711.1364054888.855.help-gnu-emacs@gnu.org>
2013-03-23 16:11 ` Avoiding 'reference to free variable' warnings while splitting elisp source files Jay Belanger
2013-03-23 16:19   ` Pascal J. Bourguignon
2013-03-23 16:51     ` Jay Belanger
2013-03-23 16:59       ` Pascal J. Bourguignon [this message]
2013-03-23 16:08 Joe Riel

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87k3oynjc0.fsf@kuiper.lan.informatimago.com \
    --to=pjb@informatimago.com \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).