]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/files.texi
Merge from origin/emacs-24
[gnu-emacs] / doc / lispref / files.texi
index 895ae426a5feda7a993c71296c7995509915dffe..55da631a3f7cdf9c430c9715382d3a04719ed2b4 100644 (file)
@@ -716,15 +716,15 @@ some other job.
 This function locks the file @var{filename}, if the current buffer is
 modified.  The argument @var{filename} defaults to the current buffer's
 visited file.  Nothing is done if the current buffer is not visiting a
-file, or is not modified, or if the system does not support locking.
+file, or is not modified, or if the option @code{create-lockfiles} is
+@code{nil}.
 @end defun
 
 @defun unlock-buffer
 This function unlocks the file being visited in the current buffer,
 if the buffer is modified.  If the buffer is not modified, then
 the file should not be locked, so this function does nothing.  It also
-does nothing if the current buffer is not visiting a file, or if the
-system does not support locking.
+does nothing if the current buffer is not visiting a file, or is not locked.
 @end defun
 
 @defopt create-lockfiles
@@ -1697,6 +1697,16 @@ version of an existing file; saving a file preserves its existing
 permissions.
 @end defun
 
+@defmac with-file-modes mode body@dots{}
+This macro evaluates the @var{body} forms with the default
+permissions for new files temporarily set to @var{modes} (whose value
+is as for @code{set-file-modes} above).  When finished, it restores
+the original default file permissions, and returns the value of the
+last form in @var{body}.
+
+This is useful for creating private files, for example.
+@end defmac
+
 @defun default-file-modes
 This function returns the default file permissions, as an integer.
 @end defun
@@ -2014,6 +2024,11 @@ form.
 @end example
 @end defun
 
+@defun directory-name-p filename
+This function returns non-@code{nil} if @var{filename} ends with a
+forward slash (@samp{/}) character.
+@end defun
+
 @node Directory Names
 @subsection Directory Names
 @cindex directory name
@@ -2601,6 +2616,14 @@ An error is signaled if @var{directory} is not the name of a directory
 that can be read.
 @end defun
 
+@defun directory-files-recursively directory match &optional include-directories
+Return all files under @var{directory} whose file names match
+@var{match} recursively.  The file names are returned ``depth first'',
+meaning that contents of sub-directories are returned before contents
+of the directories.  If @var{include-directories} is non-@code{nil},
+also return directory names that have matching names.
+@end defun
+
 @defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format
 This is similar to @code{directory-files} in deciding which files
 to report on and how to report their names.  However, instead