Subject: Re: bug#11634: 24.1; Emacs fails to start, bidi_mirror_table is nil in bidi_initialize

From: Ulrich Mueller <[email-masked]>
Date: Thu, 7 Jun 2012 20:06:51 +0200

>>>>> On Thu, 07 Jun 2012, Eli Zaretskii wrote:

>> (--no-site-lisp should work though, even if Emacs was configured
>> with a non-default locallisppath.

> Can you see why it didn't?

Gentoo's ebuild configures Emacs with (basically)
--enable-locallisppath="/etc/emacs:/usr/share/emacs/site-lisp",
because according to our policy user-configurable files like
site-start.el should go to /etc, not /usr/share.

As Glenn has already mentioned above, the code that collects the
site-lisp dirs in init_lread() will stop at the first element that
doesn't contain "site-lisp" in its name:

	      /* Remove "site-lisp" dirs from front of path temporarily
		 and store them in sitelisp, then conc them on at the
		 end so they're always first in path.
		 Note that this won't work if you used a
		 --enable-locallisppath element that does not happen
		 to contain "site-lisp" in its name.
	      */
	      sitelisp = Qnil;
	      while (1)
		{
		  tem = Fcar (Vload_path);
		  tem1 = Fstring_match (build_string ("site-lisp"),
					tem, Qnil);
		  if (!NILP (tem1))
		    {
		      Vload_path = Fcdr (Vload_path);
		      sitelisp = Fcons (tem, sitelisp);
		    }
		  else
		    break;
		}