aboutsummaryrefslogtreecommitdiffstats
path: root/doc
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
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')
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/cmdargs.texi11
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/loading.texi33
4 files changed, 38 insertions, 16 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 229929d132d..a0d5344641e 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,8 @@
12013-11-23 Glenn Morris <rgm@gnu.org>
2
3 * cmdargs.texi (General Variables):
4 Empty elements in EMACSLOADPATH now mean the default load-path.
5
12013-11-21 Glenn Morris <rgm@gnu.org> 62013-11-21 Glenn Morris <rgm@gnu.org>
2 7
3 * cmdargs.texi (Action Arguments): Use path-separator with -L. 8 * cmdargs.texi (Action Arguments): Use path-separator with -L.
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 92861c443f1..4294f775e5e 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -455,13 +455,16 @@ This is used to initialize the variable @code{data-directory}.
455Directory for the documentation string file, which is used to 455Directory for the documentation string file, which is used to
456initialize the Lisp variable @code{doc-directory}. 456initialize the Lisp variable @code{doc-directory}.
457@item EMACSLOADPATH 457@item EMACSLOADPATH
458A colon-separated list of directories@footnote{ Here and below, 458A colon-separated list of directories@footnote{Here and below,
459whenever we say ``colon-separated list of directories'', it pertains 459whenever we say ``colon-separated list of directories'', it pertains
460to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the 460to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the
461directories are separated by semi-colons instead, since DOS/Windows 461directories are separated by semi-colons instead, since DOS/Windows
462file names might include a colon after a drive letter.} to search for 462file names might include a colon after a drive letter.} to search for
463Emacs Lisp files. If set, it overrides the usual initial value of the 463Emacs Lisp files. If set, it modifies the usual initial value of the
464@code{load-path} variable (@pxref{Lisp Libraries}). 464@code{load-path} variable (@pxref{Lisp Libraries}). An empty element
465stands for the default value of @code{load-path}; e.g., using
466@samp{EMACSLOADPATH="/tmp:"} adds @file{/tmp} to the front of
467the default @code{load-path}.
465@item EMACSPATH 468@item EMACSPATH
466A colon-separated list of directories to search for executable files. 469A colon-separated list of directories to search for executable files.
467If set, Emacs uses this in addition to @env{PATH} (see below) when 470If set, Emacs uses this in addition to @env{PATH} (see below) when
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,