aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorGlenn Morris2013-11-22 17:55:16 -0800
committerGlenn Morris2013-11-22 17:55:16 -0800
commit17e0445be4a6a4f437f4be4924074c90d6477481 (patch)
treec78a4df4e1c2f9daf840c96d15dc9e00dd71c68d /doc/lispref
parent72648ef2605b654caf515ef020c2cac70cd0d741 (diff)
downloademacs-17e0445be4a6a4f437f4be4924074c90d6477481.tar.gz
emacs-17e0445be4a6a4f437f4be4924074c90d6477481.zip
Empty elements in EMACSLOADPATH now stand for the default
* src/lread.c (load_path_check): Take path to check as argument. (load_path_default): New, split from init_lread. (init_lread): Move calc of default load-path to load_path_default. Empty elements in EMACSLOADPATH now stand for the default. (load-path): Doc fix. * src/emacs.c (decode_env_path): Add option to treat empty elements as nil rather than ".". * src/callproc.c (init_callproc_1, init_callproc): * src/image.c (Vx_bitmap_file_path): * src/lisp.h (decode_env_path): * lread.c (Vsource_directory): Update for new argument spec of decode_env_path. * leim/Makefile.in (RUN_EMACS): Empty EMACSLOADPATH rather than unsetting. * lisp/Makefile.in (emacs): Empty EMACSLOADPATH rather than unsetting. * test/automated/Makefile.in (emacs): Empty EMACSLOADPATH rather than unsetting. * doc/emacs/cmdargs.texi (General Variables): Empty elements in EMACSLOADPATH now mean the default load-path. * doc/lispref/loading.texi (Library Search): Empty elements in EMACSLOADPATH now mean the default load-path. * etc/NEWS: Mention this. Fixes: debbugs:12100
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/loading.texi33
2 files changed, 26 insertions, 12 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 8a082a851c9..5251efec3e4 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12013-11-23 Glenn Morris <rgm@gnu.org>
2
3 * loading.texi (Library Search):
4 Empty elements in EMACSLOADPATH now mean the default load-path.
5
12013-11-22 Glenn Morris <rgm@gnu.org> 62013-11-22 Glenn Morris <rgm@gnu.org>
2 7
3 * loading.texi (Library Search): Minor clarification. 8 * loading.texi (Library Search): Minor clarification.
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 38a73b4e296..aae92de99cb 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -310,25 +310,34 @@ directories, if they exist. Normally these directories do not contain
310@file{site-lisp} directories.) 310@file{site-lisp} directories.)
311 311
312@cindex @env{EMACSLOADPATH} environment variable 312@cindex @env{EMACSLOADPATH} environment variable
313If the environment variable @env{EMACSLOADPATH} is set, it overrides 313If the environment variable @env{EMACSLOADPATH} is set, it modifies
314the above initialization procedure. That is, Emacs initializes 314the above initialization procedure. Emacs initializes
315@code{load-path} based solely on the value of the environment 315@code{load-path} based on the value of the environment variable.
316variable. You must therefore include the directory containing the
317standard Lisp files, else Emacs will not function. In most
318situations, it is better to use the @option{-L} command-line option
319(see below) to add elements to @code{load-path}.
320 316
321The syntax of @env{EMACSLOADPATH} is the same as used for @code{PATH}; 317The syntax of @env{EMACSLOADPATH} is the same as used for @code{PATH};
322directory names are separated by @samp{:} (or @samp{;}, on some 318directory names are separated by @samp{:} (or @samp{;}, on some
323operating systems), and @samp{.} stands for the current default 319operating systems).
324directory. Here is an example of how to set @env{EMACSLOADPATH} 320@ignore
325variable (from a @command{sh}-style shell): 321@c AFAICS, does not (yet) work right to specify non-absolute elements.
322and @samp{.} stands for the current default directory.
323@end ignore
324Here is an example of how to set @env{EMACSLOADPATH} variable (from a
325@command{sh}-style shell):
326 326
327@example 327@example
328export EMACSLOADPATH 328export EMACSLOADPATH=/home/foo/.emacs.d/lisp:
329EMACSLOADPATH=/home/foo/.emacs.d/lisp:/usr/local/emacs/24.3/lisp
330@end example 329@end example
331 330
331An empty element in the value of the environment variable, whether
332trailing (as in the above example), leading, or embedded, is replaced
333by the default value of @code{load-path} as determined by the standard
334initialization procedure. If there are no such empty elements, then
335@env{EMACSLOADPATH} specifies the entire @code{load-path}. You must
336include either an empty element, or the explicit path to the directory
337containing the standard Lisp files, else Emacs will not function.
338(Another way to modify @code{load-path} is to use the @option{-L}
339command-line option when starting Emacs; see below.)
340
332 For each directory in @code{load-path}, Emacs then checks to see if 341 For each directory in @code{load-path}, Emacs then checks to see if
333it contains a file @file{subdirs.el}, and if so, loads it. The 342it contains a file @file{subdirs.el}, and if so, loads it. The
334@file{subdirs.el} file is created when Emacs is built/installed, 343@file{subdirs.el} file is created when Emacs is built/installed,