Subject: Re: bug#21104: 25.0.50; relative paths are added to load-path without -nsl (bug#21104)

From: Glenn Morris <[email-masked]>
Date: Tue, 08 Dec 2015 12:54:52 -0500

Eli Zaretskii wrote:

> Does the patch below solve the problem?

If I read configure correctly, the same issue will occur on any platform
if configured with --enable-locallisppath=no, so you could try it out.

Which suggests this (undocumented?) option has never worked properly,
so one option is simply to remove that alternative and not allow
locallispath to be empty, and choose a better default on OS X.
One can always call emacs --no-site-lisp for the same effect.

> (Does anyone know why we call decode_env_path with last argument zero
> in this case? 

The last argument is a relatively new addition. Before it existed
decode_env_path behaved like it was zero. So when adding the new
argument the default was to use zero. Again, this suggests empty
locallispath never worked as intended.

But like Andreas, my guess would be that "." and nil are equivalent here.
Maybe you could just special-case it so that PATH_SITELOADSEARCH empty
acts like no_site_lisp is set?