diff options
| author | Paul Eggert | 2025-07-24 14:49:52 -0700 |
|---|---|---|
| committer | Paul Eggert | 2025-07-24 22:13:47 -0700 |
| commit | eb9ec79c13f17d610fcb6de49628b8a7686fbab7 (patch) | |
| tree | 65229f340d83d020275e5f28b640d7b4d2722827 /doc | |
| parent | 6a08a9a54d4ff5aafe795c7a079709993c08dff3 (diff) | |
| download | emacs-eb9ec79c13f17d610fcb6de49628b8a7686fbab7.tar.gz emacs-eb9ec79c13f17d610fcb6de49628b8a7686fbab7.zip | |
PATH defaults now act more like GNU and POSIX
When PATH is unset or empty, use the system default,
to be consistent with GNU/Linux and with POSIX.
If there is no system default do not default to "."
as that can be dangerous.
* src/callproc.c (init_callproc_1, init_callproc):
Default PATH to the null pointer, not the empty string.
* src/emacs.c (default_PATH): New function.
(find_emacs_executable, decode_env_path): Be consistent with POSIX
and with glibc about what to do when PATH is unset or empty.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/cmdargs.texi | 1 | ||||
| -rw-r--r-- | doc/emacs/misc.texi | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 00167056be1..79ae2d064d1 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi | |||
| @@ -695,6 +695,7 @@ The name of the organization to which you belong. Used for setting the | |||
| 695 | A colon-separated list of directories containing executable files. | 695 | A colon-separated list of directories containing executable files. |
| 696 | This is used to initialize the variable @code{exec-path} | 696 | This is used to initialize the variable @code{exec-path} |
| 697 | (@pxref{Shell}). | 697 | (@pxref{Shell}). |
| 698 | If unset or empty, an implementation-dependent default is used. | ||
| 698 | @item PWD | 699 | @item PWD |
| 699 | @vindex PWD@r{, environment variable} | 700 | @vindex PWD@r{, environment variable} |
| 700 | If set, this should be the default directory when Emacs was started. | 701 | If set, this should be the default directory when Emacs was started. |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 88b7bfc7049..2c2c710eea4 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -753,8 +753,8 @@ available. | |||
| 753 | (either in the @var{cmd} argument to one of the above commands, or in | 753 | (either in the @var{cmd} argument to one of the above commands, or in |
| 754 | other contexts), Emacs searches for the program in the directories | 754 | other contexts), Emacs searches for the program in the directories |
| 755 | specified by the variable @code{exec-path}. The value of this | 755 | specified by the variable @code{exec-path}. The value of this |
| 756 | variable must be a list of directories; the default value is | 756 | variable must be a list of directories; the default value |
| 757 | initialized from the environment variable @env{PATH} when Emacs is | 757 | depends on the environment variable @env{PATH} when Emacs is |
| 758 | started (@pxref{General Variables}). | 758 | started (@pxref{General Variables}). |
| 759 | 759 | ||
| 760 | @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It | 760 | @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It |