Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
944ef994
Commit
944ef994
authored
Dec 21, 1997
by
Richard M. Stallman
Browse files
(find-file-noselect): Signal error if file is unreadable.
parent
bb760c71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
lisp/files.el
lisp/files.el
+8
-0
No files found.
lisp/files.el
View file @
944ef994
...
...
@@ -914,11 +914,19 @@ 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
))
(
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment