# HG changeset patch # User Richard M. Stallman # Date 766919086 0 # Node ID 0c4d3481bb1b80caceb2b602a3a592bbc4cf2418 # Parent 176bb79caecfc316721f457ee8a6a5a6228bd516 (init_lread): Maybe put build-time Lisp dirs on load-path. (init_lread): Improve warning message. diff -r 176bb79caecf -r 0c4d3481bb1b src/lread.c --- a/src/lread.c Thu Apr 21 09:04:25 1994 +0000 +++ b/src/lread.c Thu Apr 21 09:04:46 1994 +0000 @@ -1870,12 +1870,20 @@ if (!NILP (Vinstallation_directory)) { /* Add to the path the lisp subdir of the - installation dir. */ - Lisp_Object tem; + installation dir, if it exists. */ + Lisp_Object tem, tem1; tem = Fexpand_file_name (build_string ("lisp"), Vinstallation_directory); - if (NILP (Fmember (tem, Vload_path))) - Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); + tem1 = Ffile_exists_p (tem); + if (!NILP (tem1)) + { + if (NILP (Fmember (tem, Vload_path))) + Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); + } + else + /* That dir doesn't exist, so add the build-time + Lisp dirs instead. */ + Vload_path = nconc2 (Vload_path, dump_path); } } } @@ -1897,7 +1905,8 @@ { dirfile = Fdirectory_file_name (dirfile); if (access (XSTRING (dirfile)->data, 0) < 0) - fprintf (stderr, "Warning: lisp library (%s) does not exist.\n", + fprintf (stderr, + "Warning: Lisp directory `%s' does not exist.\n", XSTRING (Fcar (path_tail))->data); } }