Commit 5f65549e authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(set-visited-file-name): Doc fix.

(write-file): Use CONFIRM when calling set-visited-file-name.
parent b691df0c
......@@ -1438,7 +1438,7 @@ Remember to delete the initial contents of the minibuffer
if you wish to pass an empty string as the argument.
The optional second argument NO-QUERY, if non-nil, inhibits asking for
confirmation in the case where the file FILENAME already exists."
confirmation in the case where another buffer is already visiting FILENAME."
(interactive "FSet visited file name: ")
(if (buffer-base-buffer)
(error "An indirect buffer cannot visit a file"))
......@@ -1553,7 +1553,7 @@ Interactively, confirmation is required unless you supply a prefix argument."
(file-exists-p filename)
(or (y-or-n-p (format "File `%s' exists; overwrite? " filename))
(error "Canceled")))
(set-visited-file-name filename)))
(set-visited-file-name filename (not confirm))))
(set-buffer-modified-p t)
(save-buffer))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment