Mercurial > hg > xemacs-beta
comparison man/lispref/files.texi @ 136:b980b6286996 r20-2b2
Import from CVS: tag r20-2b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:31:12 +0200 |
parents | 131b0175ea99 |
children | 1856695b1fa9 |
comparison
equal
deleted
inserted
replaced
135:4636a6841cd6 | 136:b980b6286996 |
---|---|
1565 | 1565 |
1566 @c Emacs 19 feature | 1566 @c Emacs 19 feature |
1567 @defun file-relative-name filename &optional directory | 1567 @defun file-relative-name filename &optional directory |
1568 This function does the inverse of expansion---it tries to return a | 1568 This function does the inverse of expansion---it tries to return a |
1569 relative name that is equivalent to @var{filename} when interpreted | 1569 relative name that is equivalent to @var{filename} when interpreted |
1570 relative to @var{directory}. (If such a relative name would be longer | 1570 relative to @var{directory}. |
1571 than the absolute name, it returns the absolute name instead.) | |
1572 | 1571 |
1573 @c XEmacs feature? | 1572 @c XEmacs feature? |
1574 If @var{directory} is @code{nil} or omitted, the value of | 1573 If @var{directory} is @code{nil} or omitted, the value of |
1575 @code{default-directory} is used. | 1574 @code{default-directory} is used. |
1576 | 1575 |
1577 @example | 1576 @example |
1578 (file-relative-name "/foo/bar" "/foo/") | 1577 (file-relative-name "/foo/bar" "/foo/") |
1579 @result{} "bar") | 1578 @result{} "bar") |
1580 (file-relative-name "/foo/bar" "/hack/") | 1579 (file-relative-name "/foo/bar" "/hack/") |
1581 @result{} "/foo/bar") | 1580 @result{} "../foo/bar") |
1582 @end example | 1581 @end example |
1583 @end defun | 1582 @end defun |
1584 | 1583 |
1585 @defvar default-directory | 1584 @defvar default-directory |
1586 The value of this buffer-local variable is the default directory for the | 1585 The value of this buffer-local variable is the default directory for the |