From xemacs-m  Tue Jan  7 16:10:47 1997
Received: from cs.utah.edu (cs.utah.edu [128.110.4.21])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with ESMTP
	  id QAA05434 for <xemacs-beta@xemacs.org>; Tue, 7 Jan 1997 16:10:46 -0600 (CST)
Received: from jaguar.cs.utah.edu by cs.utah.edu (8.8.4/utah-2.21-cs)
	id PAA28959; Tue, 7 Jan 1997 15:05:31 -0700 (MST)
Received: by jaguar.cs.utah.edu (8.6.10/utah-2.15-leaf)
	id PAA02096; Tue, 7 Jan 1997 15:05:19 -0700
Date: Tue, 7 Jan 1997 15:05:19 -0700
From: eeide@jaguar.cs.utah.edu (Eric Eide)
Message-Id: <199701072205.PAA02096@jaguar.cs.utah.edu>
To: xemacs-beta@xemacs.org
In-reply-to: Michael Kifer's message of Tue, Jan 07 <199701072136.QAA04780@cs.sunysb.edu>
Subject: Re: annoying compiler messages 

Another solution --- involving more work --- would be to tell the byte compiler
what Emacs system you are targeting, and to give the compiler knowledge about
which variables are used in what systems etc.

I wrote some compile-time version-determination stuff a few years ago (in
`emacs-vers.el', available from `http://www.cs.utah.edu/~eeide/emacs/').
Version tests could be done at compile time, and code for foreign Emacsen could
be removed, thereby avoiding warnings.  I don't know if the compile-time checks
work with current versions of the byte compiler.

One could enhance this scheme.  Instead of setting a particular target, just
modify the macro handling to set the target within certain forms.  (E.g., if
the this-is-XEmacs test is true, then this must be XEmacs, so compile the
then-form based on that assumption and emitting appropriate warnings).  I never
implemented this.

Pie in the sky...

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .   University of Utah Dept. of Computer Science
http://www.cs.utah.edu/~eeide  . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX

