emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106634: src/w32.c: Implement --no-si


From: Juanma Barranquero
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106634: src/w32.c: Implement --no-site-lisp on Windows (bug#10208).
Date: Thu, 08 Dec 2011 00:14:13 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106634
fixes bug(s): http://debbugs.gnu.org/10208
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Thu 2011-12-08 00:14:13 +0100
message:
  src/w32.c: Implement --no-site-lisp on Windows (bug#10208).
modified:
  src/ChangeLog
  src/w32.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-12-07 02:16:53 +0000
+++ b/src/ChangeLog     2011-12-07 23:14:13 +0000
@@ -1,3 +1,8 @@
+2011-12-07  Juanma Barranquero  <address@hidden>
+
+       * w32.c (init_environment): If no_site_lisp, remove site-lisp
+       dirs from the default value of EMACSLOADPATH (bug#10208).
+
 2011-12-07  Glenn Morris  <address@hidden>
 
        * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in

=== modified file 'src/w32.c'
--- a/src/w32.c 2011-11-20 02:29:42 +0000
+++ b/src/w32.c 2011-12-07 23:14:13 +0000
@@ -1654,6 +1654,24 @@
         }
     }
 
+  /* When Emacs is invoked with --no-site-lisp, we must remove the
+     site-lisp directories from the default value of EMACSLOADPATH.
+     This assumes that the site-lisp entries are at the front, and
+     that additional entries do exist.  */
+  if (no_site_lisp)
+    {
+      for (i = 0; i < N_ENV_VARS; i++)
+        {
+          if (strcmp (env_vars[i].name, "EMACSLOADPATH") == 0)
+            {
+              char *site;
+              while ((site = strstr (env_vars[i].def_value, "site-lisp")))
+                env_vars[i].def_value = strchr (site, ';') + 1;
+              break;
+            }
+        }
+    }
+
 #define SET_ENV_BUF_SIZE (4 * MAX_PATH)        /* to cover EMACSLOADPATH */
 
     /* Treat emacs_dir specially: set it unconditionally based on our


reply via email to

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