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
b7d19f4a
Commit
b7d19f4a
authored
May 29, 1995
by
Karl Heuer
Browse files
(find-file-noselect): In "file changed" messages,
mention buffer name if different from file name.
parent
70efb613
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
lisp/files.el
lisp/files.el
+13
-5
No files found.
lisp/files.el
View file @
b7d19f4a
...
...
@@ -685,11 +685,19 @@ The buffer is not selected, just returned to the caller."
(
cond
((
not
(
file-exists-p
filename
))
(
error
"File %s no longer exists!"
filename
))
((
yes-or-no-p
(
format
(
if
(
buffer-modified-p
buf
)
"File %s changed on disk. Discard your edits? "
"File %s changed on disk. Reread from disk? "
)
(
file-name-nondirectory
filename
)))
(
if
(
string=
(
file-name-nondirectory
filename
)
(
buffer-name
buf
))
(
format
(
if
(
buffer-modified-p
buf
)
"File %s changed on disk. Discard your edits? "
"File %s changed on disk. Reread from disk? "
)
(
file-name-nondirectory
filename
))
(
format
(
if
(
buffer-modified-p
buf
)
"File %s changed on disk. Discard your edits in %s? "
"File %s changed on disk. Reread from disk into %s? "
)
(
file-name-nondirectory
filename
)
(
buffer-name
buf
))))
(
save-excursion
(
set-buffer
buf
)
(
revert-buffer
t
t
)))))
...
...
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