bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10208: site-lisp directories in load-path after --no-site-lisp


From: Achim Gratz
Subject: bug#10208: site-lisp directories in load-path after --no-site-lisp
Date: Sat, 07 Jan 2012 18:18:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]