diff options
| author | Alex Branham | 2017-11-24 10:59:12 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-11-24 10:59:12 +0200 |
| commit | ed36c71a1e36b919c57cd9f1ab73210e64810fcb (patch) | |
| tree | a69c296d2e960960249e59bddf1068a3146e1236 | |
| parent | 197dd690112e8eef6457b16adbe6e2c1d801c849 (diff) | |
| download | emacs-ed36c71a1e36b919c57cd9f1ab73210e64810fcb.tar.gz emacs-ed36c71a1e36b919c57cd9f1ab73210e64810fcb.zip | |
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)
| -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." | |||
| 5881 | (error "%s is an auto-save file" (abbreviate-file-name file))) | 5881 | (error "%s is an auto-save file" (abbreviate-file-name file))) |
| 5882 | (let ((file-name (let ((buffer-file-name file)) | 5882 | (let ((file-name (let ((buffer-file-name file)) |
| 5883 | (make-auto-save-file-name)))) | 5883 | (make-auto-save-file-name)))) |
| 5884 | (cond ((if (file-exists-p file) | 5884 | (cond ((and (file-exists-p file) |
| 5885 | (not (file-exists-p file-name))) | ||
| 5886 | (error "Auto save file %s does not exist" | ||
| 5887 | (abbreviate-file-name file-name))) | ||
| 5888 | ((if (file-exists-p file) | ||
| 5885 | (not (file-newer-than-file-p file-name file)) | 5889 | (not (file-newer-than-file-p file-name file)) |
| 5886 | (not (file-exists-p file-name))) | 5890 | (not (file-exists-p file-name))) |
| 5887 | (error "Auto-save file %s not current" | 5891 | (error "Auto-save file %s not current" |