aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-10-26 18:12:01 +0000
committerRichard M. Stallman1996-10-26 18:12:01 +0000
commit5f65549e3f9db70dfffe763c9a037dbf010a8a8c (patch)
tree1ad29dce170dd56a833e566c42a47801b48ed057
parentb691df0c08b37358cd4e083898989fdde197aef1 (diff)
downloademacs-5f65549e3f9db70dfffe763c9a037dbf010a8a8c.tar.gz
emacs-5f65549e3f9db70dfffe763c9a037dbf010a8a8c.zip
(set-visited-file-name): Doc fix.
(write-file): Use CONFIRM when calling set-visited-file-name.
-rw-r--r--lisp/files.el4
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
1438if you wish to pass an empty string as the argument. 1438if you wish to pass an empty string as the argument.
1439 1439
1440The optional second argument NO-QUERY, if non-nil, inhibits asking for 1440The optional second argument NO-QUERY, if non-nil, inhibits asking for
1441confirmation in the case where the file FILENAME already exists." 1441confirmation in the case where another buffer is already visiting FILENAME."
1442 (interactive "FSet visited file name: ") 1442 (interactive "FSet visited file name: ")
1443 (if (buffer-base-buffer) 1443 (if (buffer-base-buffer)
1444 (error "An indirect buffer cannot visit a file")) 1444 (error "An indirect buffer cannot visit a file"))
@@ -1553,7 +1553,7 @@ Interactively, confirmation is required unless you supply a prefix argument."
1553 (file-exists-p filename) 1553 (file-exists-p filename)
1554 (or (y-or-n-p (format "File `%s' exists; overwrite? " filename)) 1554 (or (y-or-n-p (format "File `%s' exists; overwrite? " filename))
1555 (error "Canceled"))) 1555 (error "Canceled")))
1556 (set-visited-file-name filename))) 1556 (set-visited-file-name filename (not confirm))))
1557 (set-buffer-modified-p t) 1557 (set-buffer-modified-p t)
1558 (save-buffer)) 1558 (save-buffer))
1559 1559