diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-10-26 18:12:01 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-10-26 18:12:01 +0000 |
commit | a4a0f4cfa3df5045333e7cfa1caa3f63e0700d54 (patch) | |
tree | e731f54707f4690b13b58028f5f4d87f3c4309d0 | |
parent | 8938b702d62396253f798b8f50f7383e5a67eabd (diff) | |
download | emacs-a4a0f4cfa3df5045333e7cfa1caa3f63e0700d54.tar.gz |
(set-visited-file-name): Doc fix.
(write-file): Use CONFIRM when calling set-visited-file-name.
-rw-r--r-- | lisp/files.el | 4 |
1 files 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)) |