diff options
| author | Richard M. Stallman | 1997-06-01 01:03:51 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-01 01:03:51 +0000 |
| commit | 0f337465d5b3ff92b5b8425f83d27ed38abdbc47 (patch) | |
| tree | 613fc0795d75aeb6e417a44577ca32763492084d /src | |
| parent | b5c535767f970733a870523b5444ab11e5df05dc (diff) | |
| download | emacs-0f337465d5b3ff92b5b8425f83d27ed38abdbc47.tar.gz emacs-0f337465d5b3ff92b5b8425f83d27ed38abdbc47.zip | |
(init_lread): Sometimes add to load-path
the lisp and site-lisp dirs under the source directory.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lread.c b/src/lread.c index 147114743b6..12482552cd3 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2511,6 +2511,32 @@ init_lread () | |||
| 2511 | if (NILP (Fmember (tem, Vload_path))) | 2511 | if (NILP (Fmember (tem, Vload_path))) |
| 2512 | Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); | 2512 | Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); |
| 2513 | } | 2513 | } |
| 2514 | |||
| 2515 | /* If Emacs was not built in the source directory, | ||
| 2516 | and it is run from where it was built, | ||
| 2517 | add to load-path | ||
| 2518 | the lisp and site-lisp dirs under the source directory. */ | ||
| 2519 | |||
| 2520 | if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) | ||
| 2521 | { | ||
| 2522 | tem = Fexpand_file_name (build_string ("src/Makefile"), | ||
| 2523 | Vinstallation_directory); | ||
| 2524 | tem1 = Ffile_exists_p (tem); | ||
| 2525 | if (!NILP (tem1)) | ||
| 2526 | { | ||
| 2527 | tem = Fexpand_file_name (build_string ("lisp"), | ||
| 2528 | Vsource_directory); | ||
| 2529 | |||
| 2530 | if (NILP (Fmember (tem, Vload_path))) | ||
| 2531 | Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); | ||
| 2532 | |||
| 2533 | tem = Fexpand_file_name (build_string ("site-lisp"), | ||
| 2534 | Vsource_directory); | ||
| 2535 | |||
| 2536 | if (NILP (Fmember (tem, Vload_path))) | ||
| 2537 | Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); | ||
| 2538 | } | ||
| 2539 | } | ||
| 2514 | } | 2540 | } |
| 2515 | } | 2541 | } |
| 2516 | } | 2542 | } |