Commit aecc82d7 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Clarify the expand-file-name doc string

* src/fileio.c (Fexpand_file_name): Clarify that "~" in NAME is
expanded, and not just "~/".  Also clarify that ~USER is not
expanded if USER doesn't exist (bug#36490).
parent 1c3b3206
Pipeline #2371 failed with stage
in 90 minutes and 2 seconds
...@@ -745,16 +745,22 @@ a directory's file name are accepted. If DEFAULT-DIRECTORY is nil or ...@@ -745,16 +745,22 @@ a directory's file name are accepted. If DEFAULT-DIRECTORY is nil or
missing, the current buffer's value of `default-directory' is used. missing, the current buffer's value of `default-directory' is used.
NAME should be a string that is a valid file name for the underlying NAME should be a string that is a valid file name for the underlying
filesystem. filesystem.
File name components that are `.' are removed, and
so are file name components followed by `..', along with the `..' itself; File name components that are `.' are removed, and so are file name
note that these simplifications are done without checking the resulting components followed by `..', along with the `..' itself; note that
file names in the file system. these simplifications are done without checking the resulting file
Multiple consecutive slashes are collapsed into a single slash, names in the file system.
except at the beginning of the file name when they are significant (e.g.,
UNC file names on MS-Windows.) Multiple consecutive slashes are collapsed into a single slash, except
An initial `~/' expands to your home directory. at the beginning of the file name when they are significant (e.g., UNC
An initial `~USER/' expands to USER's home directory. file names on MS-Windows.)
See also the function `substitute-in-file-name'.
An initial \"~\" in NAME expands to your home directory.
An initial \"~USER\" in NAME expands to USER's home directory. If
USER doesn't exist, \"~USER\" is not expanded.
To do other file name substitutions, see `substitute-in-file-name'.
For technical reasons, this function can return correct but For technical reasons, this function can return correct but
non-intuitive results for the root directory; for instance, non-intuitive results for the root directory; for instance,
......
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