Mercurial > emacs
diff lisp/files.el @ 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 | 7ddf71a26f4b |
children | 4ff9d9b75477 |
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.