all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: 10208@debbugs.gnu.org
Subject: bug#10208: site-lisp directories in load-path after --no-site-lisp
Date: Sat, 07 Jan 2012 18:18:32 +0100	[thread overview]
Message-ID: <87ipknfn2v.fsf@Rainer.invalid> (raw)
In-Reply-To: <CAAeL0STPmUeXcMLwSw8QCEaA4Gvu87RCtPxr_XYh7G2X7EzNaQ@mail.gmail.com>

Achim Gratz <Stromeko@nexgo.de> writes:
> I must be missing something or the option never propagates to lread.c?

The whole incantation that removes the site-lisp from load-path is
safeguarded with "if (!NILP (Vinstallation_directory))", so for the
installed Emacs the --no-site-lisp option is never actually acted upon,
since installation-directory is nil.

The places to safeguard are actually further down, so the following
patch (I have not touched indentation to minimize the number of changed
lines) would allow --no-site-lisp to take effect as described in the man
page (the way I've read it, anyway).

--8<---------------cut here---------------start------------->8---
diff --git a/src/lread.c b/src/lread.c
index 8e6b6f6..6367370 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4128,10 +4128,9 @@ init_lread (void)
     {
       if (! NILP (Fequal (dump_path, Vload_path)))
 	{
+	  int nilp_inst_dir = NILP (Vinstallation_directory);
+	  Lisp_Object tem, tem1, sitelisp;
 	  Vload_path = decode_env_path (0, normal);
-	  if (!NILP (Vinstallation_directory))
-	    {
-	      Lisp_Object tem, tem1, sitelisp;
 
 	      /* Remove site-lisp dirs from path temporarily and store
 		 them in sitelisp, then conc them on at the end so
@@ -4169,6 +4168,7 @@ init_lread (void)
 		   Lisp dirs instead.  */
 		Vload_path = nconc2 (Vload_path, dump_path);
 
+	      if (!nilp_inst_dir) {
 	      /* Add leim under the installation dir, if it exists.  */
 	      tem = Fexpand_file_name (build_string ("leim"),
 				       Vinstallation_directory);
@@ -4191,7 +4191,7 @@ init_lread (void)
 			Vload_path = Fcons (tem, Vload_path);
 		    }
 		}
-
+	      }
 	      /* If Emacs was not built in the source directory,
 		 and it is run from where it was built, add to load-path
 		 the lisp, leim and site-lisp dirs under that directory.  */
@@ -4237,7 +4237,7 @@ init_lread (void)
 		}
 	      if (!NILP (sitelisp) && !no_site_lisp)
 		Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path);
-	    }
+	    
 	}
     }
   else
--8<---------------cut here---------------end--------------->8---


HTH,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada






  reply	other threads:[~2012-01-07 17:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-03 23:29 bug#10208: site-lisp directories in load-path after --no-site-lisp Juanma Barranquero
2011-12-07  2:18 ` Glenn Morris
2012-01-04 19:42   ` Achim Gratz
2012-01-06 21:57     ` Achim Gratz
2012-01-07 17:18       ` Achim Gratz [this message]
2012-01-11  1:08         ` Glenn Morris
2012-01-12 10:38           ` ASSI
2012-01-12 20:36             ` Glenn Morris
2012-01-17 21:42           ` Achim Gratz
2011-12-07 23:16 ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ipknfn2v.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=10208@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.