mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(revert-buffer): Different error message for reverting a nonexistent file.
This commit is contained in:
parent
a1a052dfa5
commit
e3bfcda9ac
1 changed files with 4 additions and 1 deletions
|
|
@ -3362,7 +3362,10 @@ non-nil, it is called instead of rereading visited file contents."
|
|||
(funcall revert-buffer-insert-file-contents-function
|
||||
file-name auto-save-p)
|
||||
(if (not (file-exists-p file-name))
|
||||
(error "File %s no longer exists!" file-name))
|
||||
(error (if buffer-file-number
|
||||
"File %s no longer exists!"
|
||||
"Cannot revert nonexistent file %s")
|
||||
file-name))
|
||||
;; Bind buffer-file-name to nil
|
||||
;; so that we don't try to lock the file.
|
||||
(let ((buffer-file-name nil))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue