help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] problems with source-directory


From: Jim Davidson
Subject: [h-e-w] problems with source-directory
Date: 13 Nov 2001 10:25:38 -0800

Emacs includes a variable source-directory, whose semantics are 
somewhat ambiguous.  It's defined as follows:

    Directory in which Emacs sources were found when Emacs was built.
    You cannot count on them to still be there!

The problem is, certain utilities (e.g., autoload.el) expect this to be set to
something reasonable, because they use the value.

Earlier versions of NTEmacs included an add-hook form in w32-fns to set this,
so that everything worked:

    (add-hook 'before-init-hook 
              '(lambda ()
                 (setq source-directory (file-name-as-directory 
                                         (expand-file-name ".." 
exec-directory)))))

However, that form has been commented out in 21.1, with the following note in 
the Changelog:

    * w32-fns.el: Comment out before-init-hook function which resets
                  source-directory based; this breaks bootstrap.

So, functions that depend on this variable (e.g., update-file-autoloads) no
longer work.  They go looking for 
        "c:/andrewi/emacs-21.1/" 
which (surprise) doesn't exist on most machines.  :-)

I think the problem is the semantics of the source-directory variable -- if it
really is a holdover from the build environment, the utilities should not try
to use it.

-Jim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]