diff options
| author | Michael Albinus | 2019-03-09 09:47:07 +0100 |
|---|---|---|
| committer | Michael Albinus | 2019-03-09 09:47:07 +0100 |
| commit | a3b193516f991ceaf79d33c6158dd7ef060c7bce (patch) | |
| tree | 17ba49bb720803d716687999eb615361fa1f6377 /doc | |
| parent | a38da0d4e532c7a8ce8f20ee5e95a50fce162469 (diff) | |
| download | emacs-a3b193516f991ceaf79d33c6158dd7ef060c7bce.tar.gz emacs-a3b193516f991ceaf79d33c6158dd7ef060c7bce.zip | |
Mention empty strings in file name expansion, emacs lisp reference
* doc/lispref/files.texi (Files, File Name Expansion):
Mention also empty strings.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/files.texi | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 403a21b3365..380e0543ddd 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -16,7 +16,7 @@ described in @ref{Backups and Auto-Saving}. | |||
| 16 | names. A file name is a string. Most of these functions expand file | 16 | names. A file name is a string. Most of these functions expand file |
| 17 | name arguments using the function @code{expand-file-name}, so that | 17 | name arguments using the function @code{expand-file-name}, so that |
| 18 | @file{~} is handled correctly, as are relative file names (including | 18 | @file{~} is handled correctly, as are relative file names (including |
| 19 | @file{../}). @xref{File Name Expansion}. | 19 | @file{../} and the empty string). @xref{File Name Expansion}. |
| 20 | 20 | ||
| 21 | In addition, certain @dfn{magic} file names are handled specially. | 21 | In addition, certain @dfn{magic} file names are handled specially. |
| 22 | For example, when a remote file name is specified, Emacs accesses the | 22 | For example, when a remote file name is specified, Emacs accesses the |
| @@ -2409,6 +2409,17 @@ This is for the sake of filesystems that have the concept of a | |||
| 2409 | superroot above the root directory @file{/}. On other filesystems, | 2409 | superroot above the root directory @file{/}. On other filesystems, |
| 2410 | @file{/../} is interpreted exactly the same as @file{/}. | 2410 | @file{/../} is interpreted exactly the same as @file{/}. |
| 2411 | 2411 | ||
| 2412 | Expanding @file{.} or the empty string returns the default directory: | ||
| 2413 | |||
| 2414 | @example | ||
| 2415 | @group | ||
| 2416 | (expand-file-name "." "/usr/spool/") | ||
| 2417 | @result{} "/usr/spool" | ||
| 2418 | (expand-file-name "" "/usr/spool/") | ||
| 2419 | @result{} "/usr/spool" | ||
| 2420 | @end group | ||
| 2421 | @end example | ||
| 2422 | |||
| 2412 | Note that @code{expand-file-name} does @emph{not} expand environment | 2423 | Note that @code{expand-file-name} does @emph{not} expand environment |
| 2413 | variables; only @code{substitute-in-file-name} does that: | 2424 | variables; only @code{substitute-in-file-name} does that: |
| 2414 | 2425 | ||