From: Richard M. Stallman Date: Tue, 28 Nov 2006 02:20:32 +0000 (+0000) Subject: (revert-buffer): Special error message if file is now not readable. X-Git-Tag: emacs-pretest-22.0.92~426 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b2d239c1ba9d4472868f40bd82a555b9de702f3d;p=emacs.git (revert-buffer): Special error message if file is now not readable. --- diff --git a/lisp/files.el b/lisp/files.el index a84844810cb..396e4c28b36 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4081,6 +4081,11 @@ non-nil, it is called instead of rereading visited file contents." "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.