aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2012-09-30 14:12:04 -0700
committerPaul Eggert2012-09-30 14:12:04 -0700
commite7a2937b11bffc9ac24936e9f46201ce2abf38cc (patch)
tree93dcf60d3f9136ef291a68e76d793a5feb50f3d6 /doc
parentb9ab1b1f1c8f85fb624b9f170f4adf7f764d248b (diff)
downloademacs-e7a2937b11bffc9ac24936e9f46201ce2abf38cc.tar.gz
emacs-e7a2937b11bffc9ac24936e9f46201ce2abf38cc.zip
file-attributes has a new optional arg FOLLOW-SYMLINKS.
* doc/lispref/files.texi (File Attributes): Describe it. (Magic File Names): Use it. * etc/NEWS: Document the change. * lisp/files.el (remote-file-name-inhibit-cache): * lisp/time.el (display-time-file-nonempty-p): Use it. * lisp/files.el (after-find-file): Don't chase links before calling file-exists-p, as file-exists-p already does the right thing. * src/dired.c (directory_files_internal, Ffile_attributes): New arg follow_symlinks. All uses changed.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/files.texi8
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index b5c847b4b72..04b677b177e 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,9 @@
12012-09-30 Paul Eggert <eggert@cs.ucla.edu>
2
3 file-attributes has a new optional arg FOLLOW-SYMLINKS.
4 * files.texi (File Attributes): Describe it.
5 (Magic File Names): Use it.
6
12012-09-30 Chong Yidong <cyd@gnu.org> 72012-09-30 Chong Yidong <cyd@gnu.org>
2 8
3 * commands.texi (Click Events): Define "mouse position list". 9 * commands.texi (Click Events): Define "mouse position list".
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 9424a661236..2b087208c60 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1187,7 +1187,7 @@ link to.
1187@end example 1187@end example
1188@end defun 1188@end defun
1189 1189
1190@defun file-attributes filename &optional id-format 1190@defun file-attributes filename &optional id-format follow-symlinks
1191@anchor{Definition of file-attributes} 1191@anchor{Definition of file-attributes}
1192This function returns a list of attributes of file @var{filename}. If 1192This function returns a list of attributes of file @var{filename}. If
1193the specified file cannot be opened, it returns @code{nil}. 1193the specified file cannot be opened, it returns @code{nil}.
@@ -1197,6 +1197,9 @@ valid values are @code{'string} and @code{'integer}. The latter is
1197the default, but we plan to change that, so you should specify a 1197the default, but we plan to change that, so you should specify a
1198non-@code{nil} value for @var{id-format} if you use the returned 1198non-@code{nil} value for @var{id-format} if you use the returned
1199@acronym{UID} or @acronym{GID}. 1199@acronym{UID} or @acronym{GID}.
1200The optional parameter @var{follow-symlinks} says whether to follow
1201@var{filename} if it is a symbolic link; if @code{t}, symbolic links
1202are followed and if @code{nil} they are not.
1200 1203
1201The elements of the list, in order, are: 1204The elements of the list, in order, are:
1202 1205
@@ -2961,8 +2964,7 @@ between consecutive checks. For example:
2961 (let ((remote-file-name-inhibit-cache 2964 (let ((remote-file-name-inhibit-cache
2962 (- display-time-interval 5))) 2965 (- display-time-interval 5)))
2963 (and (file-exists-p file) 2966 (and (file-exists-p file)
2964 (< 0 (nth 7 (file-attributes 2967 (< 0 (nth 7 (file-attributes file nil t))))))
2965 (file-chase-links file)))))))
2966@end example 2968@end example
2967@end defopt 2969@end defopt
2968 2970