From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Avoiding 'reference to free variable' warnings while splittingelisp source files Date: Sat, 23 Mar 2013 09:19:30 -0700 Message-ID: References: <20130323090800.172d8df4@gauss> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364055596 10208 80.91.229.3 (23 Mar 2013 16:19:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Mar 2013 16:19:56 +0000 (UTC) To: "'Joe Riel'" , "'Help GNU Emacs'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 23 17:20:22 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UJRB3-00035J-5M for geh-help-gnu-emacs@m.gmane.org; Sat, 23 Mar 2013 17:20:17 +0100 Original-Received: from localhost ([::1]:32964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJRAf-0006td-CB for geh-help-gnu-emacs@m.gmane.org; Sat, 23 Mar 2013 12:19:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJRAT-0006tO-Fq for help-gnu-emacs@gnu.org; Sat, 23 Mar 2013 12:19:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJRAS-0008Hu-Gp for help-gnu-emacs@gnu.org; Sat, 23 Mar 2013 12:19:41 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:50351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJRAS-0008Hq-8w for help-gnu-emacs@gnu.org; Sat, 23 Mar 2013 12:19:40 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r2NGJc9D013029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 Mar 2013 16:19:39 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r2NGJbJX000238 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Mar 2013 16:19:37 GMT Original-Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r2NGJbYA014059; Sat, 23 Mar 2013 11:19:37 -0500 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Mar 2013 09:19:37 -0700 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 In-Reply-To: <20130323090800.172d8df4@gauss> Thread-Index: Ac4n4J4pQc8jQyY0SbeB07YIe0PC2wAASILg X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89691 Archived-At: > 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? Use a vacuous definition: (defvar the-variable) See (elisp) `Defining Variables': This form defines `foo' but does not initialize it: (defvar foo) => foo