Mercurial > emacs
changeset 20492:8f8db0e25b29
(find-file-noselect): Signal error if file is unreadable.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 21 Dec 1997 02:10:01 +0000 |
parents | d884af34ba47 |
children | 698bee206f03 |
files | lisp/files.el |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Sun Dec 21 02:08:37 1997 +0000 +++ b/lisp/files.el Sun Dec 21 02:10:01 1997 +0000 @@ -914,11 +914,19 @@ (condition-case () (insert-file-contents-literally filename t) (file-error + (when (not (file-readable-p filename)) + (kill-buffer buf) + (signal 'file-error (list "File is not readable" + filename))) ;; Unconditionally set error (setq error t))) (condition-case () (insert-file-contents filename t) (file-error + (when (not (file-readable-p filename)) + (kill-buffer buf) + (signal 'file-error (list "File is not readable" + filename))) ;; Run find-file-not-found-hooks until one returns non-nil. (or (run-hook-with-args-until-success 'find-file-not-found-hooks) ;; If they fail too, set error.