changeset 17398:a5d9cbc4e2c5

(file-relative-name): Say correctly when the value is absolute.
author Richard M. Stallman <rms@gnu.org>
date Fri, 11 Apr 1997 18:31:38 +0000
parents e1bc0ba41a50
children 04fc73bb3416
files lispref/files.texi
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/files.texi	Fri Apr 11 18:27:07 1997 +0000
+++ b/lispref/files.texi	Fri Apr 11 18:31:38 1997 +0000
@@ -1561,8 +1561,13 @@
 @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/")