[Top][All Lists]

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

Re: Correct Path to Emacs C Sources after Installation

From: Alexander Shukaev
Subject: Re: Correct Path to Emacs C Sources after Installation
Date: Wed, 5 Nov 2014 17:23:35 +0100

Unless I'm missing something, this unconditionally sets the value of
source-directory to /usr/local/share/emacs/VERSION/etc/ in the
installed binary, is that right?  If so, I don't think this can be
acceptable, because it disallows the current practice of leaving the
sources where Emacs was built.

It sets the default to "/usr/local/share/emacs/VERSION/" only when Emacs is installed. During the build stage the default of 

    = Fexpand_file_name (build_string ("../"),
Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0)));

remains. So that sources would end up under "/usr/local/share/emacs/VERSION/src".

As I said earlier, I like Stefan's suggestion of changing the users of
this variable, so that they could look in alternative places if the C
sources in source-directory are not accessible.

They can tweak it by changing this variable manually to point to those alternative places. Here we're considering only reasonable default. By the way this default complies with how "load-path" is initialized.
After all, it might
well be that the sources are being removed while Emacs is running, so
a one-time computation might still cause failure.

After all, it might be that "lisp" and "site-lisp" sources are removed too and then Emacs would fail too. It's not about 1 time computation here. If ones moves sources, then one is responsible to change the value of the variable manually through Emacs Lisp. Once again the discussion is about default. Anyway what's your point here?
There are only 2 users of source-directory now: find-func.el and
check-declare.el.  All you need is to teach them to look in
data-directory if the files cannot be found in source-directory.  I
think this will be much easier, and perhaps should also use some
defcustom that users could customize (e.g., Emacs could look in a list
of directories, not just one particular place).
This haven't been done before, i.e. there was only a hard coded path to sources during build and nobody cared. Why would we need to do that now and why is this easier than the proposed patch, could you elaborate? You don't like C code changes?


Glad to help.

reply via email to

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