From 5f65549e3f9db70dfffe763c9a037dbf010a8a8c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 26 Oct 1996 18:12:01 +0000 Subject: [PATCH] (set-visited-file-name): Doc fix. (write-file): Use CONFIRM when calling set-visited-file-name. --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 2de1dd5dee9..3dce4be9354 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)) -- 2.39.5