From xemacs-m  Fri Apr 11 13:52:48 1997
Received: from cs.utah.edu (cs.utah.edu [128.110.4.21])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id NAA11459
	for <xemacs-beta@xemacs.org>; Fri, 11 Apr 1997 13:52:44 -0500 (CDT)
Received: from jaguar.cs.utah.edu by cs.utah.edu (8.8.4/utah-2.21-cs)
	id MAA21300; Fri, 11 Apr 1997 12:52:44 -0600 (MDT)
Received: by jaguar.cs.utah.edu (8.6.10/utah-2.15-leaf)
	id MAA09469; Fri, 11 Apr 1997 12:52:43 -0600
Date: Fri, 11 Apr 1997 12:52:43 -0600
From: eeide@jaguar.cs.utah.edu (Eric Eide)
Message-Id: <199704111852.MAA09469@jaguar.cs.utah.edu>
To: xemacs-beta@xemacs.org
In-reply-to: Steven L Baur's message of , Apr 11 <m2bu7lbfmg.fsf@altair.xemacs.org>
Subject: Re: [20.1b14]VM: symbols function def is void vm-xemacs-p

Steven L Baur <steve@miranova.com> writes:

	Steven> [emacs-vers.el] changes the byte compiler.  That combined with
	Steven> the date on the code makes me very nervous.

Perhaps I can console you by telling you that the author is still around :-).

I confess that I haven't been tracking the byte compiler recently, but
`emacs-vers' isn't as insidious as you make it sound.  The package installs
some byte-optimizer source-->source transformers but really these are trivial
inlining routines.  The hugeness that Kyle previously referred to is entirely
due to the bulk of the codewalker.

Some simple handtesting shows that the optimizers still work in XEmacs 19.15.

To see the effect of the optimizers, you can invoke `byte-optimize-form':

	(byte-optimize-form '(emacs-version= 19 15))
	(byte-optimize-form '(emacs-version>= 19))
	(byte-optimize-form '(emacs-version= x y))

To see the effect of compile-time version determinination:

	(setq byte-optimize-use-compile-time-version-info t) ;; See doc.
	(byte-optimize-form '(emacs-version= 19 15))
	(byte-optimize-form '(emacs-version>= 19))

	;; Will reduce to (quote foo) or (quote bar).
	(byte-optimize-form '(if (emacs-version= 19) 'foo 'bar))

The last example shows how one might reduce the number of compile-time warnings
in the XEmacs lisp libraries: just optimize away the code that doesn't apply to
the target XEmacs.  Of course, you pay a price in portability.

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

