[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ed36c71: More informative error when autosave file
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master ed36c71: More informative error when autosave file is not available |
Date: |
Fri, 24 Nov 2017 04:01:13 -0500 (EST) |
branch: master
commit ed36c71a1e36b919c57cd9f1ab73210e64810fcb
Author: Alex Branham <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
lisp/files.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/files.el b/lisp/files.el
index ae90d19..63dd509 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"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ed36c71: More informative error when autosave file is not available,
Eli Zaretskii <=