changeset 49931:7ff13fa2e27a

(revert-buffer): Different error message for reverting a nonexistent file.
author Richard M. Stallman <rms@gnu.org>
date Sun, 23 Feb 2003 15:04:11 +0000
parents 0f71486df5bc
children 2f5cdffaaa04
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sun Feb 23 15:00:30 2003 +0000
+++ b/lisp/files.el	Sun Feb 23 15:04:11 2003 +0000
@@ -3362,7 +3362,10 @@
 		     (funcall revert-buffer-insert-file-contents-function
 			      file-name auto-save-p)
 		   (if (not (file-exists-p file-name))
-		       (error "File %s no longer exists!" file-name))
+		       (error (if buffer-file-number
+				  "File %s no longer exists!"
+				"Cannot revert nonexistent file %s")
+			      file-name))
 		   ;; Bind buffer-file-name to nil
 		   ;; so that we don't try to lock the file.
 		   (let ((buffer-file-name nil))