From 897998291fd09c3b9825a07045fa05f17bf83875 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 21 Oct 2016 13:04:02 -0700 Subject: New error file-missing This fixes a recently-introduced bug in delete-directory, where the code assumes the C locale when determining whether a file-error corresponds to a missing file (Bug#24714). * doc/lispref/errors.texi (Standard Errors): * doc/lispref/files.texi (Changing Files): * etc/NEWS: Document this. * doc/lispref/loading.texi (How Programs Do Loading): Say "a file-error" rather than "the error file-error" since it might be a file-missing now. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): * lisp/epa-file.el (epa-file--find-file-not-found-function): (epa-file-insert-file-contents, epa-file-write-region): * lisp/ffap.el (find-file-at-point, dired-at-point): * lisp/jka-compr.el (jka-compr-insert-file-contents) (jka-compr-insert-file-contents): * lisp/net/ange-ftp.el (ange-ftp-barf-if-not-directory) (ange-ftp-insert-file-contents, ange-ftp-copy-file-internal): * lisp/progmodes/etags.el (visit-tags-table): * lisp/url/url-handlers.el (url-copy-file): * src/fileio.c (report_file_errno): Signal file-missing if appropriate. * lisp/epa-file.el (epa-file-insert-file-contents): * lisp/jka-compr.el (jka-compr-insert-file-contents): Don't assume file-error is a leaf in the error hierarchy. * lisp/files.el (files--force): * lisp/gnus/nnmaildir.el (nnmaildir--enoent-p): * lisp/jka-compr.el (jka-compr-insert-file-contents): Use file-missing to detect whether the file is missing. * lisp/url/url-handlers.el (url-copy-file): Signal file-already-exists if appropriate. * src/fileio.c (syms_of_fileio): Define file-missing. 2016-10-18 Paul Eggert --- etc/NEWS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'etc') diff --git a/etc/NEWS b/etc/NEWS index 4e41dbb39a8..d9973c0fd48 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -624,6 +624,11 @@ collection). ** The new functions 'make-nearby-temp-file' and 'temporary-file-directory' can be used for creation of temporary files of remote or mounted directories. ++++ +** The new error 'file-missing', a subcategory of 'file-error', is now +signaled instead of 'file-error' if a file operation acts on a file +that does not exist. + +++ ** The function 'delete-directory' no longer signals an error when operating recursively and when some other process deletes the directory -- cgit v1.2.1