diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-04-11 18:31:38 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-04-11 18:31:38 +0000 |
commit | 89c771728bc03623d78312c9d8035218f6a657d5 (patch) | |
tree | b736c67192c47719aeab442f26423b1ec87ee758 /lispref/files.texi | |
parent | d038ca1d3769a30eaa5185d48b0ebfcd859ee5f1 (diff) | |
download | emacs-89c771728bc03623d78312c9d8035218f6a657d5.tar.gz |
(file-relative-name): Say correctly when the value is absolute.
Diffstat (limited to 'lispref/files.texi')
-rw-r--r-- | lispref/files.texi | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lispref/files.texi b/lispref/files.texi index db196c8f7ee..950eea2c2af 100644 --- a/lispref/files.texi +++ b/lispref/files.texi @@ -1561,8 +1561,13 @@ variables; only @code{substitute-in-file-name} does that. @defun file-relative-name filename directory This function does the inverse of expansion---it tries to return a relative name that is equivalent to @var{filename} when interpreted -relative to @var{directory}. (If such a relative name would be longer -than the absolute name, it returns the absolute name instead.) +relative to @var{directory}. + +On some operating systems, an absolute file name begins with a device +name. On such systems, @var{filename} has no relative equivalent based +on @var{directory} if they start with two different device names. In +this case, @code{file-relative-name} returns @var{filename} in absolute +form. @example (file-relative-name "/foo/bar" "/foo/") |