diff options
| author | Glenn Morris | 2012-06-30 14:10:50 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-06-30 14:10:50 -0700 |
| commit | ca26824cb07d494481a14fea1642d38ad6c2a9e4 (patch) | |
| tree | c0a3d299f228fd444741729ea0549c1927f96582 | |
| parent | 9ff8f76bbca43e021f842b24493885f1c034f6a4 (diff) | |
| download | emacs-ca26824cb07d494481a14fea1642d38ad6c2a9e4.tar.gz emacs-ca26824cb07d494481a14fea1642d38ad6c2a9e4.zip | |
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.
Fixes: debbugs:11658
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | Makefile.in | 18 | ||||
| -rw-r--r-- | configure.in | 4 | ||||
| -rw-r--r-- | lisp/loadup.el | 4 | ||||
| -rw-r--r-- | nt/ChangeLog | 4 | ||||
| -rw-r--r-- | nt/paths.h | 5 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/epaths.in | 20 | ||||
| -rw-r--r-- | src/lread.c | 237 |
9 files changed, 171 insertions, 136 deletions
| @@ -1,3 +1,11 @@ | |||
| 1 | 2012-06-30 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.in (standardlisppath): New output variable. | ||
| 4 | (lisppath): Use standardlisppath. | ||
| 5 | * Makefile.in (standardlisppath): New, set by configure. | ||
| 6 | (epaths-force): Use standardlisppath and locallisppath rather than | ||
| 7 | lisppath. | ||
| 8 | |||
| 1 | 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru> | 9 | 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 10 | ||
| 3 | * configure.in: Fix previous change. Remove --enable-asserts. | 11 | * configure.in: Fix previous change. Remove --enable-asserts. |
diff --git a/Makefile.in b/Makefile.in index fb2530d13df..0900bd1946f 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -186,16 +186,20 @@ iconsrcdir=$(srcdir)/etc/images/icons | |||
| 186 | lispdir=@lispdir@ | 186 | lispdir=@lispdir@ |
| 187 | leimdir=@leimdir@ | 187 | leimdir=@leimdir@ |
| 188 | 188 | ||
| 189 | # Directories Emacs should search for lisp files specific | 189 | # Directories Emacs should search for standard lisp files. |
| 190 | # to this site (i.e. customizations), before consulting | 190 | # The default is ${lispdir}:${leimdir}. |
| 191 | # ${lispdir}. This should be a colon-separated list of | 191 | standardlisppath=@standardlisppath@ |
| 192 | # directories. | 192 | |
| 193 | # Directories Emacs should search for lisp files specific to this | ||
| 194 | # site (i.e. customizations), before consulting ${standardlisppath}. | ||
| 195 | # This should be a colon-separated list of directories. | ||
| 193 | locallisppath=@locallisppath@ | 196 | locallisppath=@locallisppath@ |
| 194 | 197 | ||
| 195 | # Where Emacs will search to find its lisp files. Before | 198 | # Where Emacs will search to find its lisp files. Before |
| 196 | # changing this, check to see if your purpose wouldn't | 199 | # changing this, check to see if your purpose wouldn't |
| 197 | # better be served by changing locallisppath. This | 200 | # better be served by changing locallisppath. This |
| 198 | # should be a colon-separated list of directories. | 201 | # should be a colon-separated list of directories. |
| 202 | # The default is ${locallisppath}:${standardlisppath}. | ||
| 199 | lisppath=@lisppath@ | 203 | lisppath=@lisppath@ |
| 200 | 204 | ||
| 201 | # Where Emacs will search for its lisp files while | 205 | # Where Emacs will search for its lisp files while |
| @@ -281,12 +285,14 @@ removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g' | |||
| 281 | # to just letting configure generate epaths.h from epaths.in in a | 285 | # to just letting configure generate epaths.h from epaths.in in a |
| 282 | # similar way to how Makefile is made from Makefile.in. | 286 | # similar way to how Makefile is made from Makefile.in. |
| 283 | epaths-force: FRC | 287 | epaths-force: FRC |
| 284 | @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \ | 288 | @(standardlisppath=`echo ${standardlisppath} | ${removenullpaths}` ; \ |
| 289 | locallisppath=`echo ${locallisppath} | ${removenullpaths}` ; \ | ||
| 285 | buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \ | 290 | buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \ |
| 286 | x_default_search_path=`echo ${x_default_search_path}`; \ | 291 | x_default_search_path=`echo ${x_default_search_path}`; \ |
| 287 | gamedir=`echo ${gamedir}`; \ | 292 | gamedir=`echo ${gamedir}`; \ |
| 288 | sed < ${srcdir}/src/epaths.in > epaths.h.$$$$ \ | 293 | sed < ${srcdir}/src/epaths.in > epaths.h.$$$$ \ |
| 289 | -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'"$${lisppath}"'";' \ | 294 | -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'"$${standardlisppath}"'";' \ |
| 295 | -e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${locallisppath}"'";' \ | ||
| 290 | -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'"$${buildlisppath}"'";' \ | 296 | -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'"$${buildlisppath}"'";' \ |
| 291 | -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \ | 297 | -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \ |
| 292 | -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \ | 298 | -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \ |
diff --git a/configure.in b/configure.in index 5c38b041dec..20b4cf2d593 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -38,9 +38,10 @@ dnl (autoconf) Installation Directory Variables | |||
| 38 | dnl See also epaths.h below. | 38 | dnl See also epaths.h below. |
| 39 | lispdir='${datadir}/emacs/${version}/lisp' | 39 | lispdir='${datadir}/emacs/${version}/lisp' |
| 40 | leimdir='${datadir}/emacs/${version}/leim' | 40 | leimdir='${datadir}/emacs/${version}/leim' |
| 41 | standardlisppath='${lispdir}:${leimdir}' | ||
| 41 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ | 42 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ |
| 42 | '${datadir}/emacs/site-lisp' | 43 | '${datadir}/emacs/site-lisp' |
| 43 | lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' | 44 | lisppath='${locallisppath}:${standardlisppath}' |
| 44 | etcdir='${datadir}/emacs/${version}/etc' | 45 | etcdir='${datadir}/emacs/${version}/etc' |
| 45 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' | 46 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' |
| 46 | docdir='${datadir}/emacs/${version}/etc' | 47 | docdir='${datadir}/emacs/${version}/etc' |
| @@ -3161,6 +3162,7 @@ AC_SUBST(mandir) | |||
| 3161 | AC_SUBST(infodir) | 3162 | AC_SUBST(infodir) |
| 3162 | AC_SUBST(lispdir) | 3163 | AC_SUBST(lispdir) |
| 3163 | AC_SUBST(leimdir) | 3164 | AC_SUBST(leimdir) |
| 3165 | AC_SUBST(standardlisppath) | ||
| 3164 | AC_SUBST(locallisppath) | 3166 | AC_SUBST(locallisppath) |
| 3165 | AC_SUBST(lisppath) | 3167 | AC_SUBST(lisppath) |
| 3166 | AC_SUBST(x_default_search_path) | 3168 | AC_SUBST(x_default_search_path) |
diff --git a/lisp/loadup.el b/lisp/loadup.el index 35681718976..11e5f1e5833 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -44,6 +44,10 @@ | |||
| 44 | 44 | ||
| 45 | ;; Add subdirectories to the load-path for files that might get | 45 | ;; Add subdirectories to the load-path for files that might get |
| 46 | ;; autoloaded when bootstrapping. | 46 | ;; autoloaded when bootstrapping. |
| 47 | ;; This is because PATH_DUMPLOADSEARCH is just "../lisp". | ||
| 48 | ;; Note that we reset load-path below just before dumping, | ||
| 49 | ;; since lread.c:init_lread checks for changes to load-path | ||
| 50 | ;; in deciding whether to modify it. | ||
| 47 | (if (or (equal (nth 3 command-line-args) "bootstrap") | 51 | (if (or (equal (nth 3 command-line-args) "bootstrap") |
| 48 | (equal (nth 4 command-line-args) "bootstrap") | 52 | (equal (nth 4 command-line-args) "bootstrap") |
| 49 | (equal (nth 3 command-line-args) "unidata-gen.el") | 53 | (equal (nth 3 command-line-args) "unidata-gen.el") |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 6b0785ad25e..b3bf4a47f06 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-06-30 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * paths.h (PATH_SITELOADSEARCH): New. | ||
| 4 | |||
| 1 | 2012-06-28 Juanma Barranquero <lekktu@gmail.com> | 5 | 2012-06-28 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * nmake.defs (CHECKING_CFLAGS): | 7 | * nmake.defs (CHECKING_CFLAGS): |
diff --git a/nt/paths.h b/nt/paths.h index 5b8bcb4e264..d3a41e3c541 100644 --- a/nt/paths.h +++ b/nt/paths.h | |||
| @@ -20,10 +20,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | /* The default search path for Lisp function "load". | 22 | /* The default search path for Lisp function "load". |
| 23 | This sets load-path. */ | 23 | Together with PATH_SITELOADSEARCH, this sets load-path. */ |
| 24 | /* #define PATH_LOADSEARCH "/usr/local/lib/emacs/lisp" */ | 24 | /* #define PATH_LOADSEARCH "/usr/local/lib/emacs/lisp" */ |
| 25 | #define PATH_LOADSEARCH "C:/emacs/lisp" | 25 | #define PATH_LOADSEARCH "C:/emacs/lisp" |
| 26 | 26 | ||
| 27 | /* Like PATH_LOADSEARCH, but contains the non-standard pieces. */ | ||
| 28 | #define PATH_SITELOADSEARCH "C:/emacs/site-lisp" | ||
| 29 | |||
| 27 | /* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This | 30 | /* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This |
| 28 | path is usually identical to PATH_LOADSEARCH except that the entry | 31 | path is usually identical to PATH_LOADSEARCH except that the entry |
| 29 | for the directory containing the installed lisp files has been | 32 | for the directory containing the installed lisp files has been |
diff --git a/src/ChangeLog b/src/ChangeLog index b79319a70ff..2391a9b7022 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-06-30 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * epaths.in (PATH_SITELOADSEARCH): New. | ||
| 4 | * lread.c (init_lread): Use PATH_SITELOADSEARCH. | ||
| 5 | This is rather than relying on --enable-locallisppath elements | ||
| 6 | having "site-lisp" in their names. (Bug#10208#25, 11658) | ||
| 7 | |||
| 1 | 2012-06-30 Eli Zaretskii <eliz@gnu.org> | 8 | 2012-06-30 Eli Zaretskii <eliz@gnu.org> |
| 2 | 9 | ||
| 3 | * w32proc.c (sys_select): Accept and ignore one more argument. | 10 | * w32proc.c (sys_select): Accept and ignore one more argument. |
diff --git a/src/epaths.in b/src/epaths.in index 17cb65a3234..705fe3aab1b 100644 --- a/src/epaths.in +++ b/src/epaths.in | |||
| @@ -19,16 +19,26 @@ You should have received a copy of the GNU General Public License | |||
| 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | /* The default value of load-path, which is the search path for | 22 | /* Together with PATH_SITELOADSEARCH, this gives the default value of |
| 23 | the Lisp function "load". Configure (using "make epaths-force") | 23 | load-path, which is the search path for the Lisp function "load". |
| 24 | sets this to $lisppath, which typically has a value like: | 24 | Configure (using "make epaths-force") sets this to |
| 25 | <datadir>/emacs/VERSION/site-lisp:<datadir>/emacs/site-lisp: | 25 | ${standardlisppath}, which typically has a value like: |
| 26 | <datadir>/emacs/VERSION/lisp:<datadir>/emacs/VERSION/leim | 26 | <datadir>/emacs/VERSION/lisp:<datadir>/emacs/VERSION/leim |
| 27 | where datadir is eg /usr/local/share. | 27 | where datadir is eg /usr/local/share. |
| 28 | */ | ||
| 29 | #define PATH_LOADSEARCH "/usr/local/share/emacs/lisp" | ||
| 30 | |||
| 31 | |||
| 32 | /* Like PATH_LOADSEARCH, but contains the non-standard pieces. | ||
| 33 | These are the site-lisp directories, typically something like | ||
| 34 | <datadir>/emacs/VERSION/site-lisp:<datadir>/emacs/site-lisp | ||
| 28 | Configure prepends any $locallisppath, as set by the | 35 | Configure prepends any $locallisppath, as set by the |
| 29 | --enable-locallisppath argument. | 36 | --enable-locallisppath argument. |
| 37 | This is combined with PATH_LOADSEARCH to make the default load-path. | ||
| 38 | If the --no-site-lisp option is used, this piece is excluded. | ||
| 30 | */ | 39 | */ |
| 31 | #define PATH_LOADSEARCH "/usr/local/share/emacs/lisp" | 40 | #define PATH_SITELOADSEARCH "/usr/local/share/emacs/site-lisp" |
| 41 | |||
| 32 | 42 | ||
| 33 | /* Like PATH_LOADSEARCH, but used only during the build process | 43 | /* Like PATH_LOADSEARCH, but used only during the build process |
| 34 | when Emacs is dumping. Configure (using "make epaths-force") sets | 44 | when Emacs is dumping. Configure (using "make epaths-force") sets |
diff --git a/src/lread.c b/src/lread.c index 2cd203da5b9..7a0b20880e9 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -4072,15 +4072,15 @@ init_lread (void) | |||
| 4072 | int turn_off_warning = 0; | 4072 | int turn_off_warning = 0; |
| 4073 | 4073 | ||
| 4074 | /* Compute the default Vload-path, with the following logic: | 4074 | /* Compute the default Vload-path, with the following logic: |
| 4075 | If CANNOT_DUMP just use PATH_LOADSEARCH. | 4075 | If CANNOT_DUMP, just use PATH_LOADSEARCH, prepending PATH_SITELOADSEARCH |
| 4076 | unless --no-site-lisp. | ||
| 4076 | Else if purify-flag (ie dumping) start from PATH_DUMPLOADSEARCH; | 4077 | Else if purify-flag (ie dumping) start from PATH_DUMPLOADSEARCH; |
| 4077 | otherwise start from PATH_LOADSEARCH. | 4078 | otherwise start from PATH_LOADSEARCH. |
| 4078 | If !initialized, then just set both Vload_path and dump_path. | 4079 | If !initialized, then just set both Vload_path and dump_path. |
| 4079 | If initialized, then if Vload_path != dump_path, do nothing. | 4080 | If initialized, then if Vload_path != dump_path, do nothing. |
| 4080 | (Presumably the load-path has already been changed by something.) | 4081 | (Presumably the load-path has already been changed by something. |
| 4081 | Also do nothing if Vinstallation_directory is nil. | 4082 | This can only (?) be from a site-load file during dumping.) |
| 4082 | Otherwise: | 4083 | If Vinstallation_directory is not nil (ie, running uninstalled): |
| 4083 | Remove site-lisp directories from the front of load-path. | ||
| 4084 | Add installation-dir/lisp (if exists and not already a member), | 4084 | Add installation-dir/lisp (if exists and not already a member), |
| 4085 | at the front, and turn off warnings about missing directories | 4085 | at the front, and turn off warnings about missing directories |
| 4086 | (because we are presumably running uninstalled). | 4086 | (because we are presumably running uninstalled). |
| @@ -4094,8 +4094,7 @@ init_lread (void) | |||
| 4094 | install-dir/src/Makefile.in does NOT exist (this is a sanity | 4094 | install-dir/src/Makefile.in does NOT exist (this is a sanity |
| 4095 | check), then repeat the above steps for source-dir/lisp, | 4095 | check), then repeat the above steps for source-dir/lisp, |
| 4096 | leim and site-lisp. | 4096 | leim and site-lisp. |
| 4097 | Finally, add the previously removed site-lisp directories back | 4097 | Finally, add the site-lisp directories at the front (if !no_site_lisp). |
| 4098 | at the front (if !no_site_lisp). | ||
| 4099 | 4098 | ||
| 4100 | We then warn about any of the load-path elements that do not | 4099 | We then warn about any of the load-path elements that do not |
| 4101 | exist. The only ones that might not exist are those from | 4100 | exist. The only ones that might not exist are those from |
| @@ -4111,9 +4110,16 @@ init_lread (void) | |||
| 4111 | uninstalled, the eventual installation directories should not yet | 4110 | uninstalled, the eventual installation directories should not yet |
| 4112 | be included in load-path. | 4111 | be included in load-path. |
| 4113 | */ | 4112 | */ |
| 4113 | |||
| 4114 | #ifdef CANNOT_DUMP | 4114 | #ifdef CANNOT_DUMP |
| 4115 | normal = PATH_LOADSEARCH; | 4115 | normal = PATH_LOADSEARCH; |
| 4116 | Vload_path = decode_env_path (0, normal); | 4116 | Vload_path = decode_env_path (0, normal); |
| 4117 | if (!no_site_lisp) | ||
| 4118 | { | ||
| 4119 | Lisp_Object sitelisp; | ||
| 4120 | sitelisp = decode_env_path (0, PATH_SITELOADSEARCH); | ||
| 4121 | if (! NILP (sitelisp)) Vload_path = nconc2 (sitelisp, Vload_path); | ||
| 4122 | } | ||
| 4117 | #else | 4123 | #else |
| 4118 | if (NILP (Vpurify_flag)) | 4124 | if (NILP (Vpurify_flag)) |
| 4119 | normal = PATH_LOADSEARCH; | 4125 | normal = PATH_LOADSEARCH; |
| @@ -4131,123 +4137,108 @@ init_lread (void) | |||
| 4131 | if (! NILP (Fequal (dump_path, Vload_path))) | 4137 | if (! NILP (Fequal (dump_path, Vload_path))) |
| 4132 | { | 4138 | { |
| 4133 | Vload_path = decode_env_path (0, normal); | 4139 | Vload_path = decode_env_path (0, normal); |
| 4134 | if (no_site_lisp || !NILP (Vinstallation_directory)) | 4140 | if (!NILP (Vinstallation_directory)) |
| 4135 | { | 4141 | { |
| 4136 | Lisp_Object tem, tem1, sitelisp; | 4142 | Lisp_Object tem, tem1; |
| 4137 | 4143 | ||
| 4138 | /* Remove "site-lisp" dirs from front of path temporarily | 4144 | /* Add to the path the lisp subdir of the |
| 4139 | and store them in sitelisp, then conc them on at the | 4145 | installation dir, if it exists. */ |
| 4140 | end so they're always first in path. | 4146 | tem = Fexpand_file_name (build_string ("lisp"), |
| 4141 | Note that this won't work if you used a | 4147 | Vinstallation_directory); |
| 4142 | --enable-locallisppath element that does not happen | 4148 | tem1 = Ffile_exists_p (tem); |
| 4143 | to contain "site-lisp" in its name. | 4149 | if (!NILP (tem1)) |
| 4144 | */ | 4150 | { |
| 4145 | sitelisp = Qnil; | 4151 | if (NILP (Fmember (tem, Vload_path))) |
| 4146 | while (1) | 4152 | { |
| 4147 | { | 4153 | turn_off_warning = 1; |
| 4148 | tem = Fcar (Vload_path); | 4154 | Vload_path = Fcons (tem, Vload_path); |
| 4149 | tem1 = Fstring_match (build_string ("site-lisp"), | 4155 | } |
| 4150 | tem, Qnil); | 4156 | } |
| 4151 | if (!NILP (tem1)) | 4157 | else |
| 4152 | { | 4158 | /* That dir doesn't exist, so add the build-time |
| 4153 | Vload_path = Fcdr (Vload_path); | 4159 | Lisp dirs instead. */ |
| 4154 | sitelisp = Fcons (tem, sitelisp); | 4160 | Vload_path = nconc2 (Vload_path, dump_path); |
| 4155 | } | 4161 | |
| 4156 | else | 4162 | /* Add leim under the installation dir, if it exists. */ |
| 4157 | break; | 4163 | tem = Fexpand_file_name (build_string ("leim"), |
| 4158 | } | 4164 | Vinstallation_directory); |
| 4159 | 4165 | tem1 = Ffile_exists_p (tem); | |
| 4160 | if (!NILP (Vinstallation_directory)) | 4166 | if (!NILP (tem1)) |
| 4161 | { | 4167 | { |
| 4162 | /* Add to the path the lisp subdir of the | 4168 | if (NILP (Fmember (tem, Vload_path))) |
| 4163 | installation dir, if it exists. */ | 4169 | Vload_path = Fcons (tem, Vload_path); |
| 4164 | tem = Fexpand_file_name (build_string ("lisp"), | 4170 | } |
| 4165 | Vinstallation_directory); | 4171 | |
| 4166 | tem1 = Ffile_exists_p (tem); | 4172 | /* Add site-lisp under the installation dir, if it exists. */ |
| 4167 | if (!NILP (tem1)) | 4173 | if (!no_site_lisp) |
| 4168 | { | 4174 | { |
| 4169 | if (NILP (Fmember (tem, Vload_path))) | 4175 | tem = Fexpand_file_name (build_string ("site-lisp"), |
| 4170 | { | 4176 | Vinstallation_directory); |
| 4171 | turn_off_warning = 1; | 4177 | tem1 = Ffile_exists_p (tem); |
| 4172 | Vload_path = Fcons (tem, Vload_path); | 4178 | if (!NILP (tem1)) |
| 4173 | } | 4179 | { |
| 4174 | } | 4180 | if (NILP (Fmember (tem, Vload_path))) |
| 4175 | else | 4181 | Vload_path = Fcons (tem, Vload_path); |
| 4176 | /* That dir doesn't exist, so add the build-time | 4182 | } |
| 4177 | Lisp dirs instead. */ | 4183 | } |
| 4178 | Vload_path = nconc2 (Vload_path, dump_path); | 4184 | |
| 4179 | 4185 | /* If Emacs was not built in the source directory, | |
| 4180 | /* Add leim under the installation dir, if it exists. */ | 4186 | and it is run from where it was built, add to load-path |
| 4181 | tem = Fexpand_file_name (build_string ("leim"), | 4187 | the lisp, leim and site-lisp dirs under that directory. */ |
| 4182 | Vinstallation_directory); | 4188 | |
| 4183 | tem1 = Ffile_exists_p (tem); | 4189 | if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) |
| 4184 | if (!NILP (tem1)) | 4190 | { |
| 4185 | { | 4191 | Lisp_Object tem2; |
| 4186 | if (NILP (Fmember (tem, Vload_path))) | 4192 | |
| 4187 | Vload_path = Fcons (tem, Vload_path); | 4193 | tem = Fexpand_file_name (build_string ("src/Makefile"), |
| 4188 | } | 4194 | Vinstallation_directory); |
| 4189 | 4195 | tem1 = Ffile_exists_p (tem); | |
| 4190 | /* Add site-lisp under the installation dir, if it exists. */ | 4196 | |
| 4191 | if (!no_site_lisp) | 4197 | /* Don't be fooled if they moved the entire source tree |
| 4192 | { | 4198 | AFTER dumping Emacs. If the build directory is indeed |
| 4193 | tem = Fexpand_file_name (build_string ("site-lisp"), | 4199 | different from the source dir, src/Makefile.in and |
| 4194 | Vinstallation_directory); | 4200 | src/Makefile will not be found together. */ |
| 4195 | tem1 = Ffile_exists_p (tem); | 4201 | tem = Fexpand_file_name (build_string ("src/Makefile.in"), |
| 4196 | if (!NILP (tem1)) | 4202 | Vinstallation_directory); |
| 4197 | { | 4203 | tem2 = Ffile_exists_p (tem); |
| 4198 | if (NILP (Fmember (tem, Vload_path))) | 4204 | if (!NILP (tem1) && NILP (tem2)) |
| 4199 | Vload_path = Fcons (tem, Vload_path); | 4205 | { |
| 4200 | } | 4206 | tem = Fexpand_file_name (build_string ("lisp"), |
| 4201 | } | 4207 | Vsource_directory); |
| 4202 | 4208 | ||
| 4203 | /* If Emacs was not built in the source directory, | 4209 | if (NILP (Fmember (tem, Vload_path))) |
| 4204 | and it is run from where it was built, add to load-path | 4210 | Vload_path = Fcons (tem, Vload_path); |
| 4205 | the lisp, leim and site-lisp dirs under that directory. */ | 4211 | |
| 4206 | 4212 | tem = Fexpand_file_name (build_string ("leim"), | |
| 4207 | if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) | 4213 | Vsource_directory); |
| 4208 | { | 4214 | |
| 4209 | Lisp_Object tem2; | 4215 | if (NILP (Fmember (tem, Vload_path))) |
| 4210 | 4216 | Vload_path = Fcons (tem, Vload_path); | |
| 4211 | tem = Fexpand_file_name (build_string ("src/Makefile"), | 4217 | |
| 4212 | Vinstallation_directory); | 4218 | if (!no_site_lisp) |
| 4213 | tem1 = Ffile_exists_p (tem); | 4219 | { |
| 4214 | 4220 | tem = Fexpand_file_name (build_string ("site-lisp"), | |
| 4215 | /* Don't be fooled if they moved the entire source tree | 4221 | Vsource_directory); |
| 4216 | AFTER dumping Emacs. If the build directory is indeed | 4222 | |
| 4217 | different from the source dir, src/Makefile.in and | 4223 | if (NILP (Fmember (tem, Vload_path))) |
| 4218 | src/Makefile will not be found together. */ | 4224 | Vload_path = Fcons (tem, Vload_path); |
| 4219 | tem = Fexpand_file_name (build_string ("src/Makefile.in"), | 4225 | } |
| 4220 | Vinstallation_directory); | 4226 | } |
| 4221 | tem2 = Ffile_exists_p (tem); | 4227 | } /* Vinstallation_directory != Vsource_directory */ |
| 4222 | if (!NILP (tem1) && NILP (tem2)) | 4228 | |
| 4223 | { | 4229 | } /* if Vinstallation_directory */ |
| 4224 | tem = Fexpand_file_name (build_string ("lisp"), | 4230 | |
| 4225 | Vsource_directory); | 4231 | /* Add the site-lisp directories at the front. */ |
| 4226 | 4232 | /* Note: If the site changed the load-path during dumping, | |
| 4227 | if (NILP (Fmember (tem, Vload_path))) | 4233 | --no-site-lisp is ignored. I don't know what to do about this. |
| 4228 | Vload_path = Fcons (tem, Vload_path); | 4234 | */ |
| 4229 | 4235 | if (!no_site_lisp) | |
| 4230 | tem = Fexpand_file_name (build_string ("leim"), | 4236 | { |
| 4231 | Vsource_directory); | 4237 | Lisp_Object sitelisp; |
| 4232 | 4238 | sitelisp = decode_env_path (0, PATH_SITELOADSEARCH); | |
| 4233 | if (NILP (Fmember (tem, Vload_path))) | 4239 | if (! NILP (sitelisp)) Vload_path = nconc2 (sitelisp, Vload_path); |
| 4234 | Vload_path = Fcons (tem, Vload_path); | 4240 | } |
| 4235 | 4241 | } /* if dump_path == Vload_path */ | |
| 4236 | if (!no_site_lisp) | ||
| 4237 | { | ||
| 4238 | tem = Fexpand_file_name (build_string ("site-lisp"), | ||
| 4239 | Vsource_directory); | ||
| 4240 | |||
| 4241 | if (NILP (Fmember (tem, Vload_path))) | ||
| 4242 | Vload_path = Fcons (tem, Vload_path); | ||
| 4243 | } | ||
| 4244 | } | ||
| 4245 | } /* Vinstallation_directory != Vsource_directory */ | ||
| 4246 | } /* if Vinstallation_directory */ | ||
| 4247 | if (!NILP (sitelisp) && !no_site_lisp) | ||
| 4248 | Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path); | ||
| 4249 | } /* if Vinstallation_directory || no_site_lisp */ | ||
| 4250 | } /* if dump_path == Vload_path */ | ||
| 4251 | } | 4242 | } |
| 4252 | else /* !initialized */ | 4243 | else /* !initialized */ |
| 4253 | { | 4244 | { |