diff options
| author | Richard M. Stallman <rms@gnu.org> | 2006-11-28 02:20:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 2006-11-28 02:20:32 +0000 |
| commit | 4882b41f5ab4483be47882a01927400d172cfea4 (patch) | |
| tree | 82d31364cf5bc46f7cf05426e08be1f880762e93 /lisp | |
| parent | ead6f4ba4fbc97ddb04710d4b1c276e4d500b26b (diff) | |
| download | emacs-4882b41f5ab4483be47882a01927400d172cfea4.tar.gz | |
(revert-buffer): Special error message if file is now not readable.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/files.el | 5 |
1 files changed, 5 insertions, 0 deletions
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. |
