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 | |
| 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')
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/cmdargs.texi | 11 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 33 |
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 @@ | |||
| 1 | 2013-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 | |||
| 1 | 2013-11-21 Glenn Morris <rgm@gnu.org> | 6 | 2013-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}. | |||
| 455 | Directory for the documentation string file, which is used to | 455 | Directory for the documentation string file, which is used to |
| 456 | initialize the Lisp variable @code{doc-directory}. | 456 | initialize the Lisp variable @code{doc-directory}. |
| 457 | @item EMACSLOADPATH | 457 | @item EMACSLOADPATH |
| 458 | A colon-separated list of directories@footnote{ Here and below, | 458 | A colon-separated list of directories@footnote{Here and below, |
| 459 | whenever we say ``colon-separated list of directories'', it pertains | 459 | whenever we say ``colon-separated list of directories'', it pertains |
| 460 | to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the | 460 | to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the |
| 461 | directories are separated by semi-colons instead, since DOS/Windows | 461 | directories are separated by semi-colons instead, since DOS/Windows |
| 462 | file names might include a colon after a drive letter.} to search for | 462 | file names might include a colon after a drive letter.} to search for |
| 463 | Emacs Lisp files. If set, it overrides the usual initial value of the | 463 | Emacs 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 |
| 465 | stands for the default value of @code{load-path}; e.g., using | ||
| 466 | @samp{EMACSLOADPATH="/tmp:"} adds @file{/tmp} to the front of | ||
| 467 | the default @code{load-path}. | ||
| 465 | @item EMACSPATH | 468 | @item EMACSPATH |
| 466 | A colon-separated list of directories to search for executable files. | 469 | A colon-separated list of directories to search for executable files. |
| 467 | If set, Emacs uses this in addition to @env{PATH} (see below) when | 470 | If 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 @@ | |||
| 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, |