From: Richard M. Stallman Date: Sun, 23 Feb 2003 15:04:11 +0000 (+0000) Subject: (revert-buffer): Different error message for reverting a nonexistent file. X-Git-Tag: ttn-vms-21-2-B4~11074 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e3bfcda9ac9b5b9a279c25539a1a4e9d94826ef3;p=emacs.git (revert-buffer): Different error message for reverting a nonexistent file. --- 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." (funcall revert-buffer-insert-file-contents-function file-name auto-save-p) (if (not (file-exists-p file-name)) - (error "File %s no longer exists!" file-name)) + (error (if buffer-file-number + "File %s no longer exists!" + "Cannot revert nonexistent file %s") + file-name)) ;; Bind buffer-file-name to nil ;; so that we don't try to lock the file. (let ((buffer-file-name nil))