diff options
author | Alex Branham <branham@utexas.edu> | 2017-11-24 10:59:12 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-11-24 10:59:12 +0200 |
commit | ed36c71a1e36b919c57cd9f1ab73210e64810fcb (patch) | |
tree | a69c296d2e960960249e59bddf1068a3146e1236 /lisp/files.el | |
parent | 197dd690112e8eef6457b16adbe6e2c1d801c849 (diff) | |
download | emacs-ed36c71a1e36b919c57cd9f1ab73210e64810fcb.tar.gz |
More informative error when autosave file is not available
* lisp/files.el (recover-file): Distinguish in error messages
between autosave file not existing and not being current.
(Bug#29179)
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index ae90d19f2f2..63dd509eab8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5881,7 +5881,11 @@ an auto-save file." (error "%s is an auto-save file" (abbreviate-file-name file))) (let ((file-name (let ((buffer-file-name file)) (make-auto-save-file-name)))) - (cond ((if (file-exists-p file) + (cond ((and (file-exists-p file) + (not (file-exists-p file-name))) + (error "Auto save file %s does not exist" + (abbreviate-file-name file-name))) + ((if (file-exists-p file) (not (file-newer-than-file-p file-name file)) (not (file-exists-p file-name))) (error "Auto-save file %s not current" |