From: Richard M. Stallman Date: Sun, 8 Aug 1993 05:01:06 +0000 (+0000) Subject: (init_lread): Normally put Vinvocation_directory X-Git-Tag: emacs-19.34~11369 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=80667d531d702af0b3258d5df140856f9f12087f;p=emacs.git (init_lread): Normally put Vinvocation_directory at end of Vload_path, if not present already. --- diff --git a/src/lread.c b/src/lread.c index 385a73d5af6..905bd264cd5 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1784,7 +1784,20 @@ init_lread () dump_path = decode_env_path (0, PATH_DUMPLOADSEARCH); if (! NILP (Fequal (dump_path, Vload_path))) - Vload_path = decode_env_path (0, normal); + { + Vload_path = decode_env_path (0, normal); + if (!NILP (Vinvocation_directory)) + { + /* Add to the path the ../lisp dir of the Emacs executable, + if that dir exists. */ + Lisp_Object tem, tem1; + tem = Fexpand_file_name (build_string ("../lisp"), + Vinvocation_directory); + tem1 = Ffile_exists_p (tem); + if (!NILP (tem1) && NILP (Fmember (tem, Vload_path))) + Vload_path = nconc2 (Vload_path, Fcons (tem, Qnil)); + } + } } else Vload_path = decode_env_path (0, normal);