From 31d024384ce7b399475651d7114b097a0309152c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 29 Aug 2012 20:47:33 -0400 Subject: [PATCH] init_lread fix for bug#12302 * src/lread.c (init_lread): For out-of-tree builds, only add the source directory's site-lisp dir to the load-path if it exists, consistent with in-tree builds. --- src/ChangeLog | 6 ++++++ src/lread.c | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b5751d859c0..fef02d8cbb5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-08-30 Glenn Morris + + * lread.c (init_lread): For out-of-tree builds, only add the + source directory's site-lisp dir to the load-path if it exists, + consistent with in-tree builds. (Bug#12302) + 2012-08-28 Jan Djärv * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize diff --git a/src/lread.c b/src/lread.c index b0413c98765..aa3e0cfc5b8 100644 --- a/src/lread.c +++ b/src/lread.c @@ -4253,9 +4253,12 @@ init_lread (void) { tem = Fexpand_file_name (build_string ("site-lisp"), Vsource_directory); - - if (NILP (Fmember (tem, Vload_path))) - Vload_path = Fcons (tem, Vload_path); + tem1 = Ffile_exists_p (tem); + if (!NILP (tem1)) + { + if (NILP (Fmember (tem, Vload_path))) + Vload_path = Fcons (tem, Vload_path); + } } } } /* Vinstallation_directory != Vsource_directory */ -- 2.39.2