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
2c5b1db7
Commit
2c5b1db7
authored
Mar 05, 2007
by
Richard M. Stallman
Browse files
(find-file-noselect): No error if file no longer exists.
Display a message and avoid other questions.
parent
4e776917
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lisp/files.el
lisp/files.el
+6
-3
No files found.
lisp/files.el
View file @
2c5b1db7
...
...
@@ -1474,11 +1474,12 @@ the various files."
(
error
"Aborted"
))
(
if
buf
;; We are using an existing buffer.
(
progn
(
let
(
nonexistent
)
(
or
nowarn
(
verify-visited-file-modtime
buf
)
(
cond
((
not
(
file-exists-p
filename
))
(
error
"File %s no longer exists!"
filename
))
(
setq
nonexistent
t
)
(
message
"File %s no longer exists!"
filename
))
;; Certain files should be reverted automatically
;; if they have changed on disk and not in the buffer.
((
and
(
not
(
buffer-modified-p
buf
))
...
...
@@ -1515,7 +1516,8 @@ the various files."
;; writable and vice versa, but if the buffer agrees
;; with the new state of the file, that is ok too.
(
let
((
read-only
(
not
(
file-writable-p
buffer-file-name
))))
(
unless
(
or
(
eq
read-only
buffer-file-read-only
)
(
unless
(
or
nonexistent
(
eq
read-only
buffer-file-read-only
)
(
eq
read-only
buffer-read-only
))
(
when
(
or
nowarn
(
let
((
question
...
...
@@ -1528,6 +1530,7 @@ the various files."
(
when
(
and
(
not
(
eq
(
not
(
null
rawfile
))
(
not
(
null
find-file-literally
))))
(
not
nonexistent
)
;; It is confusing to ask whether to visit
;; non-literally if they have the file in
;; hexl-mode.
...
...
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