mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-20 18:17:20 +00:00
(init_lread): Move the site-lisp dirs later in the path.
This commit is contained in:
parent
bbfdedefb1
commit
3ddff13835
@ -1,3 +1,7 @@
|
||||
2002-01-16 Henrik Enberg <henrik@enberg.org>
|
||||
|
||||
* lread.c (init_lread): Move the site-lisp dirs later in the path.
|
||||
|
||||
2002-01-16 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* xterm.c (x_erase_phys_cursor): Don't erase cursor if cursor row
|
||||
|
35
src/lread.c
35
src/lread.c
@ -3366,9 +3366,28 @@ init_lread ()
|
||||
Vload_path = decode_env_path (0, normal);
|
||||
if (!NILP (Vinstallation_directory))
|
||||
{
|
||||
Lisp_Object tem, tem1, sitelisp;
|
||||
|
||||
/* Remove site-lisp dirs from path temporarily and store
|
||||
them in sitelisp, then conc them on at the end so
|
||||
they're always first in path. */
|
||||
sitelisp = Qnil;
|
||||
while (1)
|
||||
{
|
||||
tem = Fcar (Vload_path);
|
||||
tem1 = Fstring_match (build_string ("site-lisp"),
|
||||
tem, Qnil);
|
||||
if (!NILP (tem1))
|
||||
{
|
||||
Vload_path = Fcdr (Vload_path);
|
||||
sitelisp = Fcons (tem, sitelisp);
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
/* Add to the path the lisp subdir of the
|
||||
installation dir, if it exists. */
|
||||
Lisp_Object tem, tem1;
|
||||
tem = Fexpand_file_name (build_string ("lisp"),
|
||||
Vinstallation_directory);
|
||||
tem1 = Ffile_exists_p (tem);
|
||||
@ -3377,7 +3396,7 @@ init_lread ()
|
||||
if (NILP (Fmember (tem, Vload_path)))
|
||||
{
|
||||
turn_off_warning = 1;
|
||||
Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil));
|
||||
Vload_path = Fcons (tem, Vload_path);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3392,7 +3411,7 @@ init_lread ()
|
||||
if (!NILP (tem1))
|
||||
{
|
||||
if (NILP (Fmember (tem, Vload_path)))
|
||||
Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil));
|
||||
Vload_path = Fcons (tem, Vload_path);
|
||||
}
|
||||
|
||||
/* Add site-list under the installation dir, if it exists. */
|
||||
@ -3402,7 +3421,7 @@ init_lread ()
|
||||
if (!NILP (tem1))
|
||||
{
|
||||
if (NILP (Fmember (tem, Vload_path)))
|
||||
Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil));
|
||||
Vload_path = Fcons (tem, Vload_path);
|
||||
}
|
||||
|
||||
/* If Emacs was not built in the source directory,
|
||||
@ -3430,21 +3449,23 @@ init_lread ()
|
||||
Vsource_directory);
|
||||
|
||||
if (NILP (Fmember (tem, Vload_path)))
|
||||
Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil));
|
||||
Vload_path = Fcons (tem, Vload_path);
|
||||
|
||||
tem = Fexpand_file_name (build_string ("leim"),
|
||||
Vsource_directory);
|
||||
|
||||
if (NILP (Fmember (tem, Vload_path)))
|
||||
Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil));
|
||||
Vload_path = Fcons (tem, Vload_path);
|
||||
|
||||
tem = Fexpand_file_name (build_string ("site-lisp"),
|
||||
Vsource_directory);
|
||||
|
||||
if (NILP (Fmember (tem, Vload_path)))
|
||||
Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil));
|
||||
Vload_path = Fcons (tem, Vload_path);
|
||||
}
|
||||
}
|
||||
if (!NILP (sitelisp))
|
||||
Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user