diff options
| author | Juri Linkov | 2012-08-08 11:17:13 +0300 |
|---|---|---|
| committer | Juri Linkov | 2012-08-08 11:17:13 +0300 |
| commit | 53fa865294bada6c2c441f195211671d427bcd69 (patch) | |
| tree | 5df48bfb30f260a1fd14c7f25f3e341376697302 | |
| parent | 242c0a95652b91de2d3b3acd2bc2b84a352ea5eb (diff) | |
| download | emacs-53fa865294bada6c2c441f195211671d427bcd69.tar.gz emacs-53fa865294bada6c2c441f195211671d427bcd69.zip | |
* lisp/files.el (basic-save-buffer): Use `buffer-name' as the default
of `read-file-name' when buffer is not visiting a file.
Fixes: debbugs:12128
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/files.el | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f77b5ee9dc4..00cbe9f36ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2012-08-08 Juri Linkov <juri@jurta.org> | 1 | 2012-08-08 Juri Linkov <juri@jurta.org> |
| 2 | 2 | ||
| 3 | * files.el (basic-save-buffer): Use `buffer-name' as the default | ||
| 4 | of `read-file-name' when buffer is not visiting a file (bug#12128). | ||
| 5 | |||
| 6 | 2012-08-08 Juri Linkov <juri@jurta.org> | ||
| 7 | |||
| 3 | * info.el (Info-isearch-search): Doc fix. | 8 | * info.el (Info-isearch-search): Doc fix. |
| 4 | (Info-search): Change search-failed message from "initial node" to | 9 | (Info-search): Change search-failed message from "initial node" to |
| 5 | "end of node" (bug#12078). | 10 | "end of node" (bug#12078). |
diff --git a/lisp/files.el b/lisp/files.el index b54d3d1b60e..c5651135dc1 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4488,7 +4488,8 @@ Before and after saving the buffer, this function runs | |||
| 4488 | (or buffer-file-name | 4488 | (or buffer-file-name |
| 4489 | (let ((filename | 4489 | (let ((filename |
| 4490 | (expand-file-name | 4490 | (expand-file-name |
| 4491 | (read-file-name "File to save in: ") nil))) | 4491 | (read-file-name "File to save in: " |
| 4492 | nil (expand-file-name (buffer-name)))))) | ||
| 4492 | (if (file-exists-p filename) | 4493 | (if (file-exists-p filename) |
| 4493 | (if (file-directory-p filename) | 4494 | (if (file-directory-p filename) |
| 4494 | ;; Signal an error if the user specified the name of an | 4495 | ;; Signal an error if the user specified the name of an |