Steve identified a problem quite awhile ago that I'm just now
diagnosing. To reproduce it, configure XEmacs 21.5 to install in a
location where you have an existing installation. Remove
modules/auto-autoloads.el* (You should do this anyway, since I just
checked in a patch that changes the structure of that file somewhat.)
Now when you build, you'll see a message indicating that XEmacs loaded
modules/auto-autoloads.elc *from the installed XEmacs*.
The source of this problem appears to be that run-in-place XEmacs gets
the wrong value for module-directory, which then poisons
module-load-path. When paths-find-module-directory (setup-paths.el) is
called, it calls paths-find-architecture-directory (find-paths.el) to do
the work. I'll paste that function in here to make the following
discussion easier.
(defun paths-find-architecture-directory (roots base &optional envvar default)
"Find an architecture-specific directory in the XEmacs hierarchy."
(or
;; from more to less specific
(paths-find-version-directory roots
(paths-construct-path
(list system-configuration base))
envvar default)
(paths-find-version-directory roots
base
envvar)
(paths-find-version-directory roots
system-configuration
envvar)))
When the build-time problem occurs, roots is a list of two elements: the
build root first, and the install root second; base is "modules". The
problem is that the first clause in the "or" above succeeds for the
install directory, when what we really wanted was for the second clause
to succeed for the build directory. For installed XEmacs, what we got
is exactly right.
It seems to me that, for run-in-place, we want to set emacs-roots to a
list containing only the build root (set startup-setup-paths, in
setup-paths.el). This would fix my problem and not mess up installed
XEmacs. Is there an easy way to accomplish that?
--
Jerry James
http://www.ittc.ku.edu/~james/