emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 a3b1935: Mention empty strings in file name expan


From: Michael Albinus
Subject: [Emacs-diffs] emacs-26 a3b1935: Mention empty strings in file name expansion, emacs lisp reference
Date: Sat, 9 Mar 2019 03:47:15 -0500 (EST)

branch: emacs-26
commit a3b193516f991ceaf79d33c6158dd7ef060c7bce
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Mention empty strings in file name expansion, emacs lisp reference
    
    * doc/lispref/files.texi (Files, File Name Expansion):
    Mention also empty strings.
---
 doc/lispref/files.texi | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 403a21b..380e054 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -16,7 +16,7 @@ described in @ref{Backups and Auto-Saving}.
 names.  A file name is a string.  Most of these functions expand file
 name arguments using the function @code{expand-file-name}, so that
 @file{~} is handled correctly, as are relative file names (including
address@hidden/}).  @xref{File Name Expansion}.
address@hidden/} and the empty string).  @xref{File Name Expansion}.
 
   In addition, certain @dfn{magic} file names are handled specially.
 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
 superroot above the root directory @file{/}.  On other filesystems,
 @file{/../} is interpreted exactly the same as @file{/}.
 
+Expanding @file{.} or the empty string returns the default directory:
+
address@hidden
address@hidden
+(expand-file-name "." "/usr/spool/")
+     @result{} "/usr/spool"
+(expand-file-name "" "/usr/spool/")
+     @result{} "/usr/spool"
address@hidden group
address@hidden example
+
 Note that @code{expand-file-name} does @emph{not} expand environment
 variables; only @code{substitute-in-file-name} does that:
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]