[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108816: Make --no-site-lisp work for
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108816: Make --no-site-lisp work for --enable-locallisppath elements |
Date: |
Sat, 30 Jun 2012 14:10:50 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108816
fixes bug: http://debbugs.gnu.org/11658
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2012-06-30 14:10:50 -0700
message:
Make --no-site-lisp work for --enable-locallisppath elements
without "site-lisp" in the name.
Ref http://debbugs.gnu.org/10208#25, point iii).
* configure.in (standardlisppath): New output variable.
(lisppath): Use standardlisppath.
* Makefile.in (standardlisppath): New, set by configure.
(epaths-force): Use standardlisppath and locallisppath rather than lisppath.
* src/epaths.in (PATH_SITELOADSEARCH): New.
* src/lread.c (init_lread): Use PATH_SITELOADSEARCH.
* nt/paths.h (PATH_SITELOADSEARCH): New.
modified:
ChangeLog
Makefile.in
configure.in
lisp/loadup.el
nt/ChangeLog
nt/paths.h
src/ChangeLog
src/epaths.in
src/lread.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-06-29 06:28:37 +0000
+++ b/ChangeLog 2012-06-30 21:10:50 +0000
@@ -1,3 +1,11 @@
+2012-06-30 Glenn Morris <address@hidden>
+
+ * configure.in (standardlisppath): New output variable.
+ (lisppath): Use standardlisppath.
+ * Makefile.in (standardlisppath): New, set by configure.
+ (epaths-force): Use standardlisppath and locallisppath rather than
+ lisppath.
+
2012-06-28 Dmitry Antipov <address@hidden>
* configure.in: Fix previous change. Remove --enable-asserts.
=== modified file 'Makefile.in'
--- a/Makefile.in 2012-06-01 18:26:21 +0000
+++ b/Makefile.in 2012-06-30 21:10:50 +0000
@@ -186,16 +186,20 @@
address@hidden@
address@hidden@
-# Directories Emacs should search for lisp files specific
-# to this site (i.e. customizations), before consulting
-# ${lispdir}. This should be a colon-separated list of
-# directories.
+# Directories Emacs should search for standard lisp files.
+# The default is ${lispdir}:${leimdir}.
address@hidden@
+
+# Directories Emacs should search for lisp files specific to this
+# site (i.e. customizations), before consulting ${standardlisppath}.
+# This should be a colon-separated list of directories.
address@hidden@
# Where Emacs will search to find its lisp files. Before
# changing this, check to see if your purpose wouldn't
# better be served by changing locallisppath. This
# should be a colon-separated list of directories.
+# The default is ${locallisppath}:${standardlisppath}.
address@hidden@
# Where Emacs will search for its lisp files while
@@ -281,12 +285,14 @@
# to just letting configure generate epaths.h from epaths.in in a
# similar way to how Makefile is made from Makefile.in.
epaths-force: FRC
- @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
+ @(standardlisppath=`echo ${standardlisppath} | ${removenullpaths}` ; \
+ locallisppath=`echo ${locallisppath} | ${removenullpaths}` ; \
buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \
x_default_search_path=`echo ${x_default_search_path}`; \
gamedir=`echo ${gamedir}`; \
sed < ${srcdir}/src/epaths.in > epaths.h.$$$$ \
- -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'"$${lisppath}"'";' \
+ -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'"$${standardlisppath}"'";' \
+ -e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${locallisppath}"'";' \
-e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'"$${buildlisppath}"'";' \
-e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \
-e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \
=== modified file 'configure.in'
--- a/configure.in 2012-06-29 06:28:37 +0000
+++ b/configure.in 2012-06-30 21:10:50 +0000
@@ -38,9 +38,10 @@
dnl See also epaths.h below.
lispdir='${datadir}/emacs/${version}/lisp'
leimdir='${datadir}/emacs/${version}/leim'
+standardlisppath='${lispdir}:${leimdir}'
locallisppath='${datadir}/emacs/${version}/site-lisp:'\
'${datadir}/emacs/site-lisp'
-lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
+lisppath='${locallisppath}:${standardlisppath}'
etcdir='${datadir}/emacs/${version}/etc'
archlibdir='${libexecdir}/emacs/${version}/${configuration}'
docdir='${datadir}/emacs/${version}/etc'
@@ -3161,6 +3162,7 @@
AC_SUBST(infodir)
AC_SUBST(lispdir)
AC_SUBST(leimdir)
+AC_SUBST(standardlisppath)
AC_SUBST(locallisppath)
AC_SUBST(lisppath)
AC_SUBST(x_default_search_path)
=== modified file 'lisp/loadup.el'
--- a/lisp/loadup.el 2012-06-27 21:15:13 +0000
+++ b/lisp/loadup.el 2012-06-30 21:10:50 +0000
@@ -44,6 +44,10 @@
;; Add subdirectories to the load-path for files that might get
;; autoloaded when bootstrapping.
+;; This is because PATH_DUMPLOADSEARCH is just "../lisp".
+;; Note that we reset load-path below just before dumping,
+;; since lread.c:init_lread checks for changes to load-path
+;; in deciding whether to modify it.
(if (or (equal (nth 3 command-line-args) "bootstrap")
(equal (nth 4 command-line-args) "bootstrap")
(equal (nth 3 command-line-args) "unidata-gen.el")
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog 2012-06-28 09:06:11 +0000
+++ b/nt/ChangeLog 2012-06-30 21:10:50 +0000
@@ -1,3 +1,7 @@
+2012-06-30 Glenn Morris <address@hidden>
+
+ * paths.h (PATH_SITELOADSEARCH): New.
+
2012-06-28 Juanma Barranquero <address@hidden>
* nmake.defs (CHECKING_CFLAGS):
=== modified file 'nt/paths.h'
--- a/nt/paths.h 2012-01-19 07:21:25 +0000
+++ b/nt/paths.h 2012-06-30 21:10:50 +0000
@@ -20,10 +20,13 @@
/* The default search path for Lisp function "load".
- This sets load-path. */
+ Together with PATH_SITELOADSEARCH, this sets load-path. */
/* #define PATH_LOADSEARCH "/usr/local/lib/emacs/lisp" */
#define PATH_LOADSEARCH "C:/emacs/lisp"
+/* Like PATH_LOADSEARCH, but contains the non-standard pieces. */
+#define PATH_SITELOADSEARCH "C:/emacs/site-lisp"
+
/* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This
path is usually identical to PATH_LOADSEARCH except that the entry
for the directory containing the installed lisp files has been
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-06-30 16:09:47 +0000
+++ b/src/ChangeLog 2012-06-30 21:10:50 +0000
@@ -1,3 +1,10 @@
+2012-06-30 Glenn Morris <address@hidden>
+
+ * epaths.in (PATH_SITELOADSEARCH): New.
+ * lread.c (init_lread): Use PATH_SITELOADSEARCH.
+ This is rather than relying on --enable-locallisppath elements
+ having "site-lisp" in their names. (Bug#10208#25, 11658)
+
2012-06-30 Eli Zaretskii <address@hidden>
* w32proc.c (sys_select): Accept and ignore one more argument.
=== modified file 'src/epaths.in'
--- a/src/epaths.in 2012-01-19 07:21:25 +0000
+++ b/src/epaths.in 2012-06-30 21:10:50 +0000
@@ -19,16 +19,26 @@
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-/* The default value of load-path, which is the search path for
- the Lisp function "load". Configure (using "make epaths-force")
- sets this to $lisppath, which typically has a value like:
- <datadir>/emacs/VERSION/site-lisp:<datadir>/emacs/site-lisp:
+/* Together with PATH_SITELOADSEARCH, this gives the default value of
+ load-path, which is the search path for the Lisp function "load".
+ Configure (using "make epaths-force") sets this to
+ ${standardlisppath}, which typically has a value like:
<datadir>/emacs/VERSION/lisp:<datadir>/emacs/VERSION/leim
where datadir is eg /usr/local/share.
+*/
+#define PATH_LOADSEARCH "/usr/local/share/emacs/lisp"
+
+
+/* Like PATH_LOADSEARCH, but contains the non-standard pieces.
+ These are the site-lisp directories, typically something like
+ <datadir>/emacs/VERSION/site-lisp:<datadir>/emacs/site-lisp
Configure prepends any $locallisppath, as set by the
--enable-locallisppath argument.
+ This is combined with PATH_LOADSEARCH to make the default load-path.
+ If the --no-site-lisp option is used, this piece is excluded.
*/
-#define PATH_LOADSEARCH "/usr/local/share/emacs/lisp"
+#define PATH_SITELOADSEARCH "/usr/local/share/emacs/site-lisp"
+
/* Like PATH_LOADSEARCH, but used only during the build process
when Emacs is dumping. Configure (using "make epaths-force") sets
=== modified file 'src/lread.c'
--- a/src/lread.c 2012-06-24 17:39:14 +0000
+++ b/src/lread.c 2012-06-30 21:10:50 +0000
@@ -4072,15 +4072,15 @@
int turn_off_warning = 0;
/* Compute the default Vload-path, with the following logic:
- If CANNOT_DUMP just use PATH_LOADSEARCH.
+ If CANNOT_DUMP, just use PATH_LOADSEARCH, prepending PATH_SITELOADSEARCH
+ unless --no-site-lisp.
Else if purify-flag (ie dumping) start from PATH_DUMPLOADSEARCH;
otherwise start from PATH_LOADSEARCH.
If !initialized, then just set both Vload_path and dump_path.
If initialized, then if Vload_path != dump_path, do nothing.
- (Presumably the load-path has already been changed by something.)
- Also do nothing if Vinstallation_directory is nil.
- Otherwise:
- Remove site-lisp directories from the front of load-path.
+ (Presumably the load-path has already been changed by something.
+ This can only (?) be from a site-load file during dumping.)
+ If Vinstallation_directory is not nil (ie, running uninstalled):
Add installation-dir/lisp (if exists and not already a member),
at the front, and turn off warnings about missing directories
(because we are presumably running uninstalled).
@@ -4094,8 +4094,7 @@
install-dir/src/Makefile.in does NOT exist (this is a sanity
check), then repeat the above steps for source-dir/lisp,
leim and site-lisp.
- Finally, add the previously removed site-lisp directories back
- at the front (if !no_site_lisp).
+ Finally, add the site-lisp directories at the front (if !no_site_lisp).
We then warn about any of the load-path elements that do not
exist. The only ones that might not exist are those from
@@ -4111,9 +4110,16 @@
uninstalled, the eventual installation directories should not yet
be included in load-path.
*/
+
#ifdef CANNOT_DUMP
normal = PATH_LOADSEARCH;
Vload_path = decode_env_path (0, normal);
+ if (!no_site_lisp)
+ {
+ Lisp_Object sitelisp;
+ sitelisp = decode_env_path (0, PATH_SITELOADSEARCH);
+ if (! NILP (sitelisp)) Vload_path = nconc2 (sitelisp, Vload_path);
+ }
#else
if (NILP (Vpurify_flag))
normal = PATH_LOADSEARCH;
@@ -4131,123 +4137,108 @@
if (! NILP (Fequal (dump_path, Vload_path)))
{
Vload_path = decode_env_path (0, normal);
- if (no_site_lisp || !NILP (Vinstallation_directory))
+ if (!NILP (Vinstallation_directory))
{
- Lisp_Object tem, tem1, sitelisp;
-
- /* 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;
- }
-
- if (!NILP (Vinstallation_directory))
- {
- /* Add to the path the lisp subdir of the
- installation dir, if it exists. */
- tem = Fexpand_file_name (build_string ("lisp"),
- Vinstallation_directory);
- tem1 = Ffile_exists_p (tem);
- if (!NILP (tem1))
- {
- if (NILP (Fmember (tem, Vload_path)))
- {
- turn_off_warning = 1;
- Vload_path = Fcons (tem, Vload_path);
- }
- }
- else
- /* That dir doesn't exist, so add the build-time
- Lisp dirs instead. */
- Vload_path = nconc2 (Vload_path, dump_path);
-
- /* Add leim under the installation dir, if it exists. */
- tem = Fexpand_file_name (build_string ("leim"),
- Vinstallation_directory);
- tem1 = Ffile_exists_p (tem);
- if (!NILP (tem1))
- {
- if (NILP (Fmember (tem, Vload_path)))
- Vload_path = Fcons (tem, Vload_path);
- }
-
- /* Add site-lisp under the installation dir, if it exists. */
- if (!no_site_lisp)
- {
- tem = Fexpand_file_name (build_string ("site-lisp"),
- Vinstallation_directory);
- tem1 = Ffile_exists_p (tem);
- if (!NILP (tem1))
- {
- if (NILP (Fmember (tem, Vload_path)))
- 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. */
-
- if (NILP (Fequal (Vinstallation_directory,
Vsource_directory)))
- {
- Lisp_Object tem2;
-
- tem = Fexpand_file_name (build_string ("src/Makefile"),
- Vinstallation_directory);
- tem1 = Ffile_exists_p (tem);
-
- /* Don't be fooled if they moved the entire source tree
- AFTER dumping Emacs. If the build directory is indeed
- different from the source dir, src/Makefile.in and
- src/Makefile will not be found together. */
- tem = Fexpand_file_name (build_string ("src/Makefile.in"),
- Vinstallation_directory);
- tem2 = Ffile_exists_p (tem);
- if (!NILP (tem1) && NILP (tem2))
- {
- tem = Fexpand_file_name (build_string ("lisp"),
- Vsource_directory);
-
- if (NILP (Fmember (tem, Vload_path)))
- Vload_path = Fcons (tem, Vload_path);
-
- tem = Fexpand_file_name (build_string ("leim"),
- Vsource_directory);
-
- if (NILP (Fmember (tem, Vload_path)))
- Vload_path = Fcons (tem, Vload_path);
-
- if (!no_site_lisp)
- {
- tem = Fexpand_file_name (build_string
("site-lisp"),
- Vsource_directory);
-
- if (NILP (Fmember (tem, Vload_path)))
- Vload_path = Fcons (tem, Vload_path);
- }
- }
- } /* Vinstallation_directory != Vsource_directory */
- } /* if Vinstallation_directory */
- if (!NILP (sitelisp) && !no_site_lisp)
- Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path);
- } /* if Vinstallation_directory || no_site_lisp */
- } /* if dump_path == Vload_path */
+ Lisp_Object tem, tem1;
+
+ /* Add to the path the lisp subdir of the
+ installation dir, if it exists. */
+ tem = Fexpand_file_name (build_string ("lisp"),
+ Vinstallation_directory);
+ tem1 = Ffile_exists_p (tem);
+ if (!NILP (tem1))
+ {
+ if (NILP (Fmember (tem, Vload_path)))
+ {
+ turn_off_warning = 1;
+ Vload_path = Fcons (tem, Vload_path);
+ }
+ }
+ else
+ /* That dir doesn't exist, so add the build-time
+ Lisp dirs instead. */
+ Vload_path = nconc2 (Vload_path, dump_path);
+
+ /* Add leim under the installation dir, if it exists. */
+ tem = Fexpand_file_name (build_string ("leim"),
+ Vinstallation_directory);
+ tem1 = Ffile_exists_p (tem);
+ if (!NILP (tem1))
+ {
+ if (NILP (Fmember (tem, Vload_path)))
+ Vload_path = Fcons (tem, Vload_path);
+ }
+
+ /* Add site-lisp under the installation dir, if it exists. */
+ if (!no_site_lisp)
+ {
+ tem = Fexpand_file_name (build_string ("site-lisp"),
+ Vinstallation_directory);
+ tem1 = Ffile_exists_p (tem);
+ if (!NILP (tem1))
+ {
+ if (NILP (Fmember (tem, Vload_path)))
+ 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. */
+
+ if (NILP (Fequal (Vinstallation_directory, Vsource_directory)))
+ {
+ Lisp_Object tem2;
+
+ tem = Fexpand_file_name (build_string ("src/Makefile"),
+ Vinstallation_directory);
+ tem1 = Ffile_exists_p (tem);
+
+ /* Don't be fooled if they moved the entire source tree
+ AFTER dumping Emacs. If the build directory is indeed
+ different from the source dir, src/Makefile.in and
+ src/Makefile will not be found together. */
+ tem = Fexpand_file_name (build_string ("src/Makefile.in"),
+ Vinstallation_directory);
+ tem2 = Ffile_exists_p (tem);
+ if (!NILP (tem1) && NILP (tem2))
+ {
+ tem = Fexpand_file_name (build_string ("lisp"),
+ Vsource_directory);
+
+ if (NILP (Fmember (tem, Vload_path)))
+ Vload_path = Fcons (tem, Vload_path);
+
+ tem = Fexpand_file_name (build_string ("leim"),
+ Vsource_directory);
+
+ if (NILP (Fmember (tem, Vload_path)))
+ Vload_path = Fcons (tem, Vload_path);
+
+ if (!no_site_lisp)
+ {
+ tem = Fexpand_file_name (build_string ("site-lisp"),
+ Vsource_directory);
+
+ if (NILP (Fmember (tem, Vload_path)))
+ Vload_path = Fcons (tem, Vload_path);
+ }
+ }
+ } /* Vinstallation_directory != Vsource_directory */
+
+ } /* if Vinstallation_directory */
+
+ /* Add the site-lisp directories at the front. */
+ /* Note: If the site changed the load-path during dumping,
+ --no-site-lisp is ignored. I don't know what to do about this.
+ */
+ if (!no_site_lisp)
+ {
+ Lisp_Object sitelisp;
+ sitelisp = decode_env_path (0, PATH_SITELOADSEARCH);
+ if (! NILP (sitelisp)) Vload_path = nconc2 (sitelisp,
Vload_path);
+ }
+ } /* if dump_path == Vload_path */
}
else /* !initialized */
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108816: Make --no-site-lisp work for --enable-locallisppath elements,
Glenn Morris <=