aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2022-12-17 12:15:30 -0800
committerPaul Eggert2022-12-17 14:24:16 -0800
commitbef1edc9cacb976120dff73b4d7bbdce6ade982b (patch)
treedd1420a157c9ce01c4d7297a380b8e8dcb86cb09 /doc
parent8a9579ca29df951ace35125873949e905fd1af2b (diff)
downloademacs-bef1edc9cacb976120dff73b4d7bbdce6ade982b.tar.gz
emacs-bef1edc9cacb976120dff73b4d7bbdce6ade982b.zip
make-directory now returns t if dir already exists
This new feature will help fix a copy-directory bug (Bug#58919). Its implementation does not rely on make-directory handlers supporting the new feature, as it no longer uses a make-directory handler H in any way other than (funcall H DIR), thus using only the intersection of the old and new behavior for handlers. This will give us time to fix handlers at our leisure. * lisp/files.el (files--ensure-directory): New arg MKDIR. All uses changed. (files--ensure-directory, make-directory): Return non-nil if DIR is already a directory. All uses changed. * test/lisp/files-tests.el (files-tests-make-directory): Test new return-value convention.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/files.texi3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index b3f63b8f32a..a767f9c28d5 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -3209,6 +3209,9 @@ This command creates a directory named @var{dirname}. If
3209@var{parents} is non-@code{nil}, as is always the case in an 3209@var{parents} is non-@code{nil}, as is always the case in an
3210interactive call, that means to create the parent directories first, 3210interactive call, that means to create the parent directories first,
3211if they don't already exist. 3211if they don't already exist.
3212As a function, @code{make-directory} returns non-@code{nil} if @var{dirname}
3213already exists as a directory and @var{parents} is non-@code{nil},
3214and returns @code{nil} if it successfully created @var{dirname}.
3212@code{mkdir} is an alias for this. 3215@code{mkdir} is an alias for this.
3213@end deffn 3216@end deffn
3214 3217