diff options
author | Glenn Morris <rgm@gnu.org> | 2011-03-03 00:10:52 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-03-03 00:10:52 -0800 |
commit | cf0fa3aa7d189166de3f874b4f854d1f1da5389f (patch) | |
tree | b7ca74c124691bbd2890c285ac88ae31da60758e | |
parent | 43c550400cd4ca8e18257a99781699655f30342c (diff) | |
download | emacs-cf0fa3aa7d189166de3f874b4f854d1f1da5389f.tar.gz |
file-truename doc fix for bug#2341.
* lisp/files.el (file-truename): Doc fix.
* doc/lispref/files.texi (Truenames): Minor clarification.
-rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
-rw-r--r-- | doc/lispref/files.texi | 3 | ||||
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/files.el | 3 |
4 files changed, 12 insertions, 2 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index e8eea3c6bf3..0ecf253e6f2 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2011-03-03 Glenn Morris <rgm@gnu.org> + + * files.texi (Truenames): Minor clarification. (Bug#2341) + 2011-03-01 Glenn Morris <rgm@gnu.org> * variables.texi (Directory Local Variables): diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 3697f18badd..e3bdebd28a1 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1041,7 +1041,8 @@ because they eliminate symbolic links as a cause of name variation. @defun file-truename filename The function @code{file-truename} returns the truename of the file -@var{filename}. The argument must be an absolute file name. +@var{filename}. If the argument is not an absolute file name, +this function first expands it against @code{default-directory}. This function does not expand environment variables. Only @code{substitute-in-file-name} does that. @xref{Definition of diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9ec9c00c90d..09044dfc644 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-03 Glenn Morris <rgm@gnu.org> + + * files.el (file-truename): Doc fix. (Bug#2341) + 2011-03-03 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> * vc/vc-dir.el (vc-dir-mode-map): Bind vc-dir-find-file to e. (Bug#7349) diff --git a/lisp/files.el b/lisp/files.el index 8849e264151..a8f937233de 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -983,7 +983,8 @@ accessible." nil))) (defun file-truename (filename &optional counter prev-dirs) - "Return the truename of FILENAME, which should be absolute. + "Return the truename of FILENAME. +If FILENAME is not absolute, first expands it against `default-directory'. The truename of a file name is found by chasing symbolic links both at the level of the file and at the level of the directories containing it, until no links are left at any level. |