Mercurial > emacs
changeset 16470:b050d980c422
(set-visited-file-name): Doc fix.
(write-file): Use CONFIRM when calling set-visited-file-name.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 26 Oct 1996 18:12:01 +0000 |
parents | 479c96f4be3a |
children | 51916440738f |
files | lisp/files.el |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Sat Oct 26 16:06:37 1996 +0000 +++ b/lisp/files.el Sat Oct 26 18:12:01 1996 +0000 @@ -1438,7 +1438,7 @@ 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 @@ (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))