diff options
| author | Richard M. Stallman | 2006-11-28 02:20:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-11-28 02:20:32 +0000 |
| commit | b2d239c1ba9d4472868f40bd82a555b9de702f3d (patch) | |
| tree | f0d3be61a4225c7437d0893a7834aaa3e91f88cf | |
| parent | 3187841b68e57047707eafff21a3002109aa81b3 (diff) | |
| download | emacs-b2d239c1ba9d4472868f40bd82a555b9de702f3d.tar.gz emacs-b2d239c1ba9d4472868f40bd82a555b9de702f3d.zip | |
(revert-buffer): Special error message if file is now not readable.
| -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." | |||
| 4081 | "File %s no longer exists!" | 4081 | "File %s no longer exists!" |
| 4082 | "Cannot revert nonexistent file %s") | 4082 | "Cannot revert nonexistent file %s") |
| 4083 | file-name)) | 4083 | file-name)) |
| 4084 | ((not (file-readable-p file-name)) | ||
| 4085 | (error (if buffer-file-number | ||
| 4086 | "File %s no longer readable!" | ||
| 4087 | "Cannot revert unreadable file %s") | ||
| 4088 | file-name)) | ||
| 4084 | (t | 4089 | (t |
| 4085 | ;; Bind buffer-file-name to nil | 4090 | ;; Bind buffer-file-name to nil |
| 4086 | ;; so that we don't try to lock the file. | 4091 | ;; so that we don't try to lock the file. |