diff options
| author | Paul Eggert | 2022-12-17 12:15:30 -0800 |
|---|---|---|
| committer | Paul Eggert | 2022-12-17 14:24:16 -0800 |
| commit | bef1edc9cacb976120dff73b4d7bbdce6ade982b (patch) | |
| tree | dd1420a157c9ce01c4d7297a380b8e8dcb86cb09 /etc | |
| parent | 8a9579ca29df951ace35125873949e905fd1af2b (diff) | |
| download | emacs-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 'etc')
| -rw-r--r-- | etc/NEWS | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -4486,6 +4486,11 @@ and cannot work with regular styles such as 'basic' or 'flex'. | |||
| 4486 | ** Magic file handlers for make-directory-internal are no longer needed. | 4486 | ** Magic file handlers for make-directory-internal are no longer needed. |
| 4487 | Instead, Emacs uses the already-existing make-directory handlers. | 4487 | Instead, Emacs uses the already-existing make-directory handlers. |
| 4488 | 4488 | ||
| 4489 | +++ | ||
| 4490 | ** (make-directory DIR t) returns non-nil if DIR already exists. | ||
| 4491 | This can let a caller know whether it created DIR. Formerly, | ||
| 4492 | make-directory's return value was unspecified. | ||
| 4493 | |||
| 4489 | 4494 | ||
| 4490 | * Changes in Emacs 29.1 on Non-Free Operating Systems | 4495 | * Changes in Emacs 29.1 on Non-Free Operating Systems |
| 4491 | 4496 | ||