# HG changeset patch # User Richard M. Stallman # Date 865127031 0 # Node ID 6f264bb70b49d59ec00ebe49b205c4d7bf9072b6 # Parent c361afa561c5104e558f0b28b8d9b87519e331ac (init_lread): Sometimes add to load-path the lisp and site-lisp dirs under the source directory. diff -r c361afa561c5 -r 6f264bb70b49 src/lread.c --- a/src/lread.c Sun Jun 01 00:30:01 1997 +0000 +++ b/src/lread.c Sun Jun 01 01:03:51 1997 +0000 @@ -2511,6 +2511,32 @@ if (NILP (Fmember (tem, Vload_path))) Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); } + + /* If Emacs was not built in the source directory, + and it is run from where it was built, + add to load-path + the lisp and site-lisp dirs under the source directory. */ + + if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) + { + tem = Fexpand_file_name (build_string ("src/Makefile"), + Vinstallation_directory); + tem1 = Ffile_exists_p (tem); + if (!NILP (tem1)) + { + tem = Fexpand_file_name (build_string ("lisp"), + Vsource_directory); + + if (NILP (Fmember (tem, Vload_path))) + Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); + + tem = Fexpand_file_name (build_string ("site-lisp"), + Vsource_directory); + + if (NILP (Fmember (tem, Vload_path))) + Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); + } + } } } }