diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-10-21 13:04:02 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-10-21 13:06:03 -0700 |
commit | 897998291fd09c3b9825a07045fa05f17bf83875 (patch) | |
tree | 03ab8a82b587c32e32d94744195dba07e5ce71ca /lisp/epa-file.el | |
parent | 76b08a35bb6b3b32e5e5fda53e374769ceae6ed8 (diff) | |
download | emacs-897998291fd09c3b9825a07045fa05f17bf83875.tar.gz emacs-897998291fd09c3b9825a07045fa05f17bf83875.tar.bz2 emacs-897998291fd09c3b9825a07045fa05f17bf83875.zip |
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 <eggert@cs.ucla.edu>
Diffstat (limited to 'lisp/epa-file.el')
-rw-r--r-- | lisp/epa-file.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/epa-file.el b/lisp/epa-file.el index ee502ef64a3..2303a085909 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el @@ -120,7 +120,7 @@ encryption is used." (let ((error epa-file-error)) (save-window-excursion (kill-buffer)) - (signal 'file-error + (signal (car error) (cons "Opening input file" (cdr error))))) (defvar last-coding-system-used) @@ -161,7 +161,7 @@ encryption is used." ;; signal that as a non-file error ;; so that find-file-noselect-1 won't handle it. ;; Borrowed from jka-compr.el. - (if (and (eq (car error) 'file-error) + (if (and (memq 'file-error (get (car error) 'error-conditions)) (equal (cadr error) "Searching for program")) (error "Decryption program `%s' not found" (nth 3 error))) @@ -175,7 +175,7 @@ encryption is used." 'epa-file--find-file-not-found-function nil t) (epa-display-error context)) - (signal 'file-error + (signal (car error) (cons "Opening input file" (cdr error))))) (set-buffer buf) ;In case timer/filter changed/killed it (bug#16029)! (setq-local epa-file-encrypt-to @@ -272,7 +272,7 @@ If no one is selected, symmetric encryption will be performed. " (epa-display-error context) (if (setq entry (assoc file epa-file-passphrase-alist)) (setcdr entry nil)) - (signal 'file-error (cons "Opening output file" (cdr error))))) + (signal (car error) (cons "Opening output file" (cdr error))))) (epa-file-run-real-handler #'write-region (list string nil file append visit lockname mustbenew)) |