Commit a3b19351 authored by Michael Albinus's avatar Michael Albinus

Mention empty strings in file name expansion, emacs lisp reference

* doc/lispref/files.texi (Files, File Name Expansion):
Mention also empty strings.
parent a38da0d4
Pipeline #952 passed with stage
in 25 minutes and 11 seconds
...@@ -16,7 +16,7 @@ described in @ref{Backups and Auto-Saving}. ...@@ -16,7 +16,7 @@ described in @ref{Backups and Auto-Saving}.
names. A file name is a string. Most of these functions expand file names. A file name is a string. Most of these functions expand file
name arguments using the function @code{expand-file-name}, so that name arguments using the function @code{expand-file-name}, so that
@file{~} is handled correctly, as are relative file names (including @file{~} is handled correctly, as are relative file names (including
@file{../}). @xref{File Name Expansion}. @file{../} and the empty string). @xref{File Name Expansion}.
In addition, certain @dfn{magic} file names are handled specially. In addition, certain @dfn{magic} file names are handled specially.
For example, when a remote file name is specified, Emacs accesses the 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,6 +2409,17 @@ This is for the sake of filesystems that have the concept of a
superroot above the root directory @file{/}. On other filesystems, superroot above the root directory @file{/}. On other filesystems,
@file{/../} is interpreted exactly the same as @file{/}. @file{/../} is interpreted exactly the same as @file{/}.
Expanding @file{.} or the empty string returns the default directory:
@example
@group
(expand-file-name "." "/usr/spool/")
@result{} "/usr/spool"
(expand-file-name "" "/usr/spool/")
@result{} "/usr/spool"
@end group
@end example
Note that @code{expand-file-name} does @emph{not} expand environment Note that @code{expand-file-name} does @emph{not} expand environment
variables; only @code{substitute-in-file-name} does that: variables; only @code{substitute-in-file-name} does that:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment