of `read-file-name' when buffer is not visiting a file.
Fixes: debbugs:12128
+2012-08-08 Juri Linkov <juri@jurta.org>
+
+ * files.el (basic-save-buffer): Use `buffer-name' as the default
+ of `read-file-name' when buffer is not visiting a file (bug#12128).
+
2012-08-08 Juri Linkov <juri@jurta.org>
* info.el (Info-isearch-search): Doc fix.
(or buffer-file-name
(let ((filename
(expand-file-name
- (read-file-name "File to save in: ") nil)))
+ (read-file-name "File to save in: "
+ nil (expand-file-name (buffer-name))))))
(if (file-exists-p filename)
(if (file-directory-p filename)
;; Signal an error if the user specified the name of an