changeset 74282:7e0bda309a90

(revert-buffer): Special error message if file is now not readable.
author Richard M. Stallman <rms@gnu.org>
date Tue, 28 Nov 2006 02:20:32 +0000
parents 0c96941203c0
children 2ba390dee911
files lisp/files.el
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Tue Nov 28 02:19:58 2006 +0000
+++ b/lisp/files.el	Tue Nov 28 02:20:32 2006 +0000
@@ -4081,6 +4081,11 @@
 			      "File %s no longer exists!"
 			    "Cannot revert nonexistent file %s")
 			  file-name))
+		  ((not (file-readable-p file-name))
+		   (error (if buffer-file-number
+			      "File %s no longer readable!"
+			    "Cannot revert unreadable file %s")
+			  file-name))
 		  (t
 		   ;; Bind buffer-file-name to nil
 		   ;; so that we don't try to lock the file.