summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-11-12 09:38:27 -0800
committerGlenn Morris <rgm@gnu.org>2018-11-12 09:38:27 -0800
commit23209e2c194f20deba26d8894a25f0ac4a607fe3 (patch)
tree028930ef8214a18e9d1346afcfd8acc1ee21c1ed /lisp/files.el
parentdb711687c3983eda60275dadcc4dc75119e6c0ae (diff)
parent913c001f43350a70c8fc9d3eb846242eb63c9ae8 (diff)
downloademacs-23209e2c194f20deba26d8894a25f0ac4a607fe3.tar.gz
Merge from origin/emacs-26
913c001 * lisp/files.el (write-file): Clarify the doc string. (Bug#3... d614b84 Fix typos in midnight.el 8c2778a Improve documentation of 'move-file-to-trash' c7b8a51 ; * doc/lispref/functions.texi (Anonymous Functions): Fix typo. 92296de * src/data.c (Ftype_of): xwidget objects are possible! (bug#3... a3242cc Improve documentation of Diff mode 39e85a0 Note that lex bound lambda forms are not self-quoting (Bug#33... fa605f2 Rewrite buffer display related doc-strings and doc aa55659 Fix call to GlobalMemoryStatusEx in w32.c # Conflicts: # doc/emacs/files.texi # src/data.c
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 0f0c7d1559a..47f7acf92cc 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4324,12 +4324,15 @@ the old visited file has been renamed to the new name FILENAME."
"Write current buffer into file FILENAME.
This makes the buffer visit that file, and marks it as not modified.
-If you specify just a directory name as FILENAME, that means to use
-the default file name but in that directory. You can also yank
-the default file name into the minibuffer to edit it, using \\<minibuffer-local-map>\\[next-history-element].
-
-If the buffer is not already visiting a file, the default file name
-for the output file is the buffer name.
+Interactively, prompt for FILENAME.
+If you specify just a directory name as FILENAME, that means to write
+to a file in that directory. In this case, the base name of the file
+is the same as that of the file visited in the buffer, or the buffer
+name sans leading directories, if any, if the buffer is not already
+visiting a file.
+
+You can also yank the file name into the minibuffer to edit it,
+using \\<minibuffer-local-map>\\[next-history-element].
If optional second arg CONFIRM is non-nil, this function
asks for confirmation before overwriting an existing file.