]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/files.el (basic-save-buffer): Use `buffer-name' as the default
authorJuri Linkov <juri@jurta.org>
Wed, 8 Aug 2012 08:17:13 +0000 (11:17 +0300)
committerJuri Linkov <juri@jurta.org>
Wed, 8 Aug 2012 08:17:13 +0000 (11:17 +0300)
of `read-file-name' when buffer is not visiting a file.

Fixes: debbugs:12128
lisp/ChangeLog
lisp/files.el

index f77b5ee9dc44c89cda57a98668ce3a284e9ee211..00cbe9f36eeaf4eec633d8dcfeff373f31971dc0 100644 (file)
@@ -1,3 +1,8 @@
+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.
index b54d3d1b60e6c68a8a9c1845ab97200c0968b1a2..c5651135dc1fd22c6bc9d053374ade7f32be871b 100644 (file)
@@ -4488,7 +4488,8 @@ Before and after saving the buffer, this function runs
          (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