emacs-devel
[Top][All Lists]
Advanced

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

Re: Correct Path to Emacs C Sources after Installation


From: Eli Zaretskii
Subject: Re: Correct Path to Emacs C Sources after Installation
Date: Wed, 05 Nov 2014 17:56:34 +0200

> Date: Tue, 4 Nov 2014 22:43:08 +0100
> From: Alexander Shukaev <address@hidden>
> 
> For the installation phase we add the *optional* "--install-sources" flag 
> which
> would trigger copying of C sources under "${etcdir}/../src" (which in fact is
> "<datadir>/emacs/VERSION/src"). We also apply the attached patch.
> 
> Looking forward to your feedback. Thanks in advance.
> 
> Kind regards,
> Alexander
> 
> --- src/lread.c.orig  2014-11-04 20:29:22.129549000 +0100
> +++ src/lread.c       2014-11-04 22:33:07.346414100 +0100
> @@ -4351,6 +4351,12 @@
>              } /* Vinstallation_directory != Vsource_directory */
>  
>          } /* if Vinstallation_directory */
> +      else
> +        {
> +          Vsource_directory
> +            = Fexpand_file_name (build_string ("../"),
> +                                 Fcar (decode_env_path (0, PATH_DATA, 0)));
> +        }
>      }
>    else                          /* !initialized */
>      {

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.

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.  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.

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).

Thanks.



reply via email to

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