mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Streamline init_callproc a bit
* src/callproc.c (init_callproc): Don’t bother testing for the existence of ../src/ and NEWS if installation-directory is non-nil, because in that case we will test for ../etc/NEWS anyway. Simplify by using AUTO_STR.
This commit is contained in:
parent
d7e8186080
commit
c403bc4d51
1 changed files with 8 additions and 10 deletions
|
|
@ -2009,19 +2009,17 @@ init_callproc (void)
|
||||||
source directory. */
|
source directory. */
|
||||||
if (data_dir == 0)
|
if (data_dir == 0)
|
||||||
{
|
{
|
||||||
Lisp_Object tem, srcdir;
|
|
||||||
Lisp_Object lispdir = Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0));
|
Lisp_Object lispdir = Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0));
|
||||||
|
if (!NILP (Vinstallation_directory)
|
||||||
srcdir = Fexpand_file_name (build_string ("../src/"), lispdir);
|
|| !NILP (Fequal (Fexpand_file_name (AUTO_STR ("../src/"), lispdir),
|
||||||
|
Vinvocation_directory))
|
||||||
tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory);
|
|| NILP (Ffile_exists_p (Fexpand_file_name (AUTO_STR ("NEWS"),
|
||||||
if (!NILP (Fequal (srcdir, Vinvocation_directory))
|
Vdata_directory))))
|
||||||
|| NILP (Ffile_exists_p (tem)) || !NILP (Vinstallation_directory))
|
|
||||||
{
|
{
|
||||||
Lisp_Object newdir;
|
Lisp_Object newdir;
|
||||||
newdir = Fexpand_file_name (build_string ("../etc/"), lispdir);
|
newdir = Fexpand_file_name (AUTO_STR ("../etc/"), lispdir);
|
||||||
tem = Fexpand_file_name (build_string ("NEWS"), newdir);
|
if (!NILP (Ffile_exists_p (Fexpand_file_name (AUTO_STR ("NEWS"),
|
||||||
if (!NILP (Ffile_exists_p (tem)))
|
newdir))))
|
||||||
Vdata_directory = newdir;
|
Vdata_directory = newdir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue