From: Glenn Morris Date: Thu, 30 Aug 2012 00:47:33 +0000 (-0400) Subject: init_lread fix for bug#12302 X-Git-Tag: emacs-24.2.90~475 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=31d024384ce7b399475651d7114b097a0309152c;p=emacs.git 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. --- 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 */