]> code.delx.au - gnu-emacs/commitdiff
Don't add "." to load path (bug#21104)
authorAnders Lindgren <andlind@gmail.com>
Wed, 9 Dec 2015 05:35:12 +0000 (06:35 +0100)
committerAnders Lindgren <andlind@gmail.com>
Wed, 9 Dec 2015 05:35:12 +0000 (06:35 +0100)
When configured with --enable-locallisppath=no, which is the
default for OS X, the load-path incorrectly was populated with ".".

* src/lread.c (init_lread): Don't call `decode_env_path' when
PATH_SITELOADSEARCH is empty.

src/lread.c

index 0da5819d34396b94820d8051cfefc6d94395300f..74a5fdfe67bcdaed30996823c1a8ab956f0f723e 100644 (file)
@@ -4353,7 +4353,7 @@ init_lread (void)
           load_path_check (default_lpath);
 
           /* Add the site-lisp directories to the front of the default.  */
-          if (!no_site_lisp)
+          if (!no_site_lisp && PATH_SITELOADSEARCH[0] != '\0')
             {
               Lisp_Object sitelisp;
               sitelisp = decode_env_path (0, PATH_SITELOADSEARCH, 0);
@@ -4384,7 +4384,7 @@ init_lread (void)
       load_path_check (Vload_path);
 
       /* Add the site-lisp directories at the front.  */
-      if (initialized && !no_site_lisp)
+      if (initialized && !no_site_lisp && PATH_SITELOADSEARCH[0] != '\0')
         {
           Lisp_Object sitelisp;
           sitelisp = decode_env_path (0, PATH_SITELOADSEARCH, 0);