# HG changeset patch # User Richard M. Stallman # Date 1164680432 0 # Node ID 7e0bda309a90f6e19cfac35744451bf874acec09 # Parent 0c96941203c0e7a1292b3f088498548f2ee3c332 (revert-buffer): Special error message if file is now not readable. diff -r 0c96941203c0 -r 7e0bda309a90 lisp/files.el --- 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.