summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-04-21 09:04:46 +0000
committerRichard M. Stallman <rms@gnu.org>1994-04-21 09:04:46 +0000
commit3a3056e5eafb81c587eb72cb442dcd9c02e7dcba (patch)
tree2dc7cacca9b8211bd96e67438fd7847110c4f596 /src/lread.c
parentf67de86ff670434940ee5f1fc00982181dc356d8 (diff)
downloademacs-3a3056e5eafb81c587eb72cb442dcd9c02e7dcba.tar.gz
(init_lread): Maybe put build-time Lisp dirs on load-path.
(init_lread): Improve warning message.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/lread.c b/src/lread.c
index d6fa228a674..c5185eebb00 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1870,12 +1870,20 @@ init_lread ()
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 @@ init_lread ()
{
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);
}
}