diff options
| author | Glenn Morris | 2013-11-22 17:55:16 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-11-22 17:55:16 -0800 |
| commit | 17e0445be4a6a4f437f4be4924074c90d6477481 (patch) | |
| tree | c78a4df4e1c2f9daf840c96d15dc9e00dd71c68d /doc/lispref | |
| parent | 72648ef2605b654caf515ef020c2cac70cd0d741 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 33 |
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 @@ | |||
| 1 | 2013-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 | |||
| 1 | 2013-11-22 Glenn Morris <rgm@gnu.org> | 6 | 2013-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 |
| 313 | If the environment variable @env{EMACSLOADPATH} is set, it overrides | 313 | If the environment variable @env{EMACSLOADPATH} is set, it modifies |
| 314 | the above initialization procedure. That is, Emacs initializes | 314 | the 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. |
| 316 | variable. You must therefore include the directory containing the | ||
| 317 | standard Lisp files, else Emacs will not function. In most | ||
| 318 | situations, it is better to use the @option{-L} command-line option | ||
| 319 | (see below) to add elements to @code{load-path}. | ||
| 320 | 316 | ||
| 321 | The syntax of @env{EMACSLOADPATH} is the same as used for @code{PATH}; | 317 | The syntax of @env{EMACSLOADPATH} is the same as used for @code{PATH}; |
| 322 | directory names are separated by @samp{:} (or @samp{;}, on some | 318 | directory names are separated by @samp{:} (or @samp{;}, on some |
| 323 | operating systems), and @samp{.} stands for the current default | 319 | operating systems). |
| 324 | directory. Here is an example of how to set @env{EMACSLOADPATH} | 320 | @ignore |
| 325 | variable (from a @command{sh}-style shell): | 321 | @c AFAICS, does not (yet) work right to specify non-absolute elements. |
| 322 | and @samp{.} stands for the current default directory. | ||
| 323 | @end ignore | ||
| 324 | Here is an example of how to set @env{EMACSLOADPATH} variable (from a | ||
| 325 | @command{sh}-style shell): | ||
| 326 | 326 | ||
| 327 | @example | 327 | @example |
| 328 | export EMACSLOADPATH | 328 | export EMACSLOADPATH=/home/foo/.emacs.d/lisp: |
| 329 | EMACSLOADPATH=/home/foo/.emacs.d/lisp:/usr/local/emacs/24.3/lisp | ||
| 330 | @end example | 329 | @end example |
| 331 | 330 | ||
| 331 | An empty element in the value of the environment variable, whether | ||
| 332 | trailing (as in the above example), leading, or embedded, is replaced | ||
| 333 | by the default value of @code{load-path} as determined by the standard | ||
| 334 | initialization procedure. If there are no such empty elements, then | ||
| 335 | @env{EMACSLOADPATH} specifies the entire @code{load-path}. You must | ||
| 336 | include either an empty element, or the explicit path to the directory | ||
| 337 | containing the standard Lisp files, else Emacs will not function. | ||
| 338 | (Another way to modify @code{load-path} is to use the @option{-L} | ||
| 339 | command-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 |
| 333 | it contains a file @file{subdirs.el}, and if so, loads it. The | 342 | it 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, |