diff options
| author | Richard M. Stallman | 2003-02-23 15:04:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-02-23 15:04:11 +0000 |
| commit | e3bfcda9ac9b5b9a279c25539a1a4e9d94826ef3 (patch) | |
| tree | a4da79b1fc2a7e93466989b5ca0c1e041000e79e /lisp | |
| parent | a1a052dfa5df1a4f93003caf44d98d64b1cd251e (diff) | |
| download | emacs-e3bfcda9ac9b5b9a279c25539a1a4e9d94826ef3.tar.gz emacs-e3bfcda9ac9b5b9a279c25539a1a4e9d94826ef3.zip | |
(revert-buffer): Different error message for reverting a nonexistent file.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/files.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index 909eba662a3..667de0570bb 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -3362,7 +3362,10 @@ non-nil, it is called instead of rereading visited file contents." | |||
| 3362 | (funcall revert-buffer-insert-file-contents-function | 3362 | (funcall revert-buffer-insert-file-contents-function |
| 3363 | file-name auto-save-p) | 3363 | file-name auto-save-p) |
| 3364 | (if (not (file-exists-p file-name)) | 3364 | (if (not (file-exists-p file-name)) |
| 3365 | (error "File %s no longer exists!" file-name)) | 3365 | (error (if buffer-file-number |
| 3366 | "File %s no longer exists!" | ||
| 3367 | "Cannot revert nonexistent file %s") | ||
| 3368 | file-name)) | ||
| 3366 | ;; Bind buffer-file-name to nil | 3369 | ;; Bind buffer-file-name to nil |
| 3367 | ;; so that we don't try to lock the file. | 3370 | ;; so that we don't try to lock the file. |
| 3368 | (let ((buffer-file-name nil)) | 3371 | (let ((buffer-file-name nil)) |