From: Richard M. Stallman Date: Sun, 21 Dec 1997 02:34:59 +0000 (+0000) Subject: (find-file-noselect): Fix previous change. X-Git-Tag: emacs-20.3~2573 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7b3d6b9c1adc074232beb0994b7d790bcfdec920;p=emacs.git (find-file-noselect): Fix previous change. --- diff --git a/lisp/files.el b/lisp/files.el index 41f3c2d237e..4d977185d26 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -914,7 +914,8 @@ Optional second arg RAWFILE non-nil means the file is read literally." (condition-case () (insert-file-contents-literally filename t) (file-error - (when (not (file-readable-p filename)) + (when (and (file-exists-p filename) + (not (file-readable-p filename))) (kill-buffer buf) (signal 'file-error (list "File is not readable" filename))) @@ -923,7 +924,8 @@ Optional second arg RAWFILE non-nil means the file is read literally." (condition-case () (insert-file-contents filename t) (file-error - (when (not (file-readable-p filename)) + (when (and (file-exists-p filename) + (not (file-readable-p filename))) (kill-buffer buf) (signal 'file-error (list "File is not readable" filename)))