aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-01-17 00:47:16 +0000
committerRichard M. Stallman2002-01-17 00:47:16 +0000
commit3ddff1383522ecb71800c1ecf418857fd36640a2 (patch)
treee844f492ec297f51be5e08713ff9ff40991c59e5 /src
parentbbfdedefb12209e132d8a568647c58a93fb080c3 (diff)
downloademacs-3ddff1383522ecb71800c1ecf418857fd36640a2.tar.gz
emacs-3ddff1383522ecb71800c1ecf418857fd36640a2.zip
(init_lread): Move the site-lisp dirs later in the path.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/lread.c35
2 files changed, 32 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 57e508f9f27..dd3b14ee103 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12002-01-16 Henrik Enberg <henrik@enberg.org>
2
3 * lread.c (init_lread): Move the site-lisp dirs later in the path.
4
12002-01-16 Kim F. Storm <storm@cua.dk> 52002-01-16 Kim F. Storm <storm@cua.dk>
2 6
3 * xterm.c (x_erase_phys_cursor): Don't erase cursor if cursor row 7 * xterm.c (x_erase_phys_cursor): Don't erase cursor if cursor row
diff --git a/src/lread.c b/src/lread.c
index 758105d16f8..ae8339ac3d0 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3366,9 +3366,28 @@ init_lread ()
3366 Vload_path = decode_env_path (0, normal); 3366 Vload_path = decode_env_path (0, normal);
3367 if (!NILP (Vinstallation_directory)) 3367 if (!NILP (Vinstallation_directory))
3368 { 3368 {
3369 Lisp_Object tem, tem1, sitelisp;
3370
3371 /* Remove site-lisp dirs from path temporarily and store
3372 them in sitelisp, then conc them on at the end so
3373 they're always first in path. */
3374 sitelisp = Qnil;
3375 while (1)
3376 {
3377 tem = Fcar (Vload_path);
3378 tem1 = Fstring_match (build_string ("site-lisp"),
3379 tem, Qnil);
3380 if (!NILP (tem1))
3381 {
3382 Vload_path = Fcdr (Vload_path);
3383 sitelisp = Fcons (tem, sitelisp);
3384 }
3385 else
3386 break;
3387 }
3388
3369 /* Add to the path the lisp subdir of the 3389 /* Add to the path the lisp subdir of the
3370 installation dir, if it exists. */ 3390 installation dir, if it exists. */
3371 Lisp_Object tem, tem1;
3372 tem = Fexpand_file_name (build_string ("lisp"), 3391 tem = Fexpand_file_name (build_string ("lisp"),
3373 Vinstallation_directory); 3392 Vinstallation_directory);
3374 tem1 = Ffile_exists_p (tem); 3393 tem1 = Ffile_exists_p (tem);
@@ -3377,7 +3396,7 @@ init_lread ()
3377 if (NILP (Fmember (tem, Vload_path))) 3396 if (NILP (Fmember (tem, Vload_path)))
3378 { 3397 {
3379 turn_off_warning = 1; 3398 turn_off_warning = 1;
3380 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); 3399 Vload_path = Fcons (tem, Vload_path);
3381 } 3400 }
3382 } 3401 }
3383 else 3402 else
@@ -3392,7 +3411,7 @@ init_lread ()
3392 if (!NILP (tem1)) 3411 if (!NILP (tem1))
3393 { 3412 {
3394 if (NILP (Fmember (tem, Vload_path))) 3413 if (NILP (Fmember (tem, Vload_path)))
3395 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); 3414 Vload_path = Fcons (tem, Vload_path);
3396 } 3415 }
3397 3416
3398 /* Add site-list under the installation dir, if it exists. */ 3417 /* Add site-list under the installation dir, if it exists. */
@@ -3402,7 +3421,7 @@ init_lread ()
3402 if (!NILP (tem1)) 3421 if (!NILP (tem1))
3403 { 3422 {
3404 if (NILP (Fmember (tem, Vload_path))) 3423 if (NILP (Fmember (tem, Vload_path)))
3405 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); 3424 Vload_path = Fcons (tem, Vload_path);
3406 } 3425 }
3407 3426
3408 /* If Emacs was not built in the source directory, 3427 /* If Emacs was not built in the source directory,
@@ -3430,21 +3449,23 @@ init_lread ()
3430 Vsource_directory); 3449 Vsource_directory);
3431 3450
3432 if (NILP (Fmember (tem, Vload_path))) 3451 if (NILP (Fmember (tem, Vload_path)))
3433 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); 3452 Vload_path = Fcons (tem, Vload_path);
3434 3453
3435 tem = Fexpand_file_name (build_string ("leim"), 3454 tem = Fexpand_file_name (build_string ("leim"),
3436 Vsource_directory); 3455 Vsource_directory);
3437 3456
3438 if (NILP (Fmember (tem, Vload_path))) 3457 if (NILP (Fmember (tem, Vload_path)))
3439 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); 3458 Vload_path = Fcons (tem, Vload_path);
3440 3459
3441 tem = Fexpand_file_name (build_string ("site-lisp"), 3460 tem = Fexpand_file_name (build_string ("site-lisp"),
3442 Vsource_directory); 3461 Vsource_directory);
3443 3462
3444 if (NILP (Fmember (tem, Vload_path))) 3463 if (NILP (Fmember (tem, Vload_path)))
3445 Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); 3464 Vload_path = Fcons (tem, Vload_path);
3446 } 3465 }
3447 } 3466 }
3467 if (!NILP (sitelisp))
3468 Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path);
3448 } 3469 }
3449 } 3470 }
3450 } 3471 }