Subject: bug#12128: 24.1.50; Default argument for `save-buffer'

From: Juri Linkov <[email-masked]>
Date: Fri, 03 Aug 2012 11:10:00 +0300

> In any case, what I what to request here is that "M-n", insetead of the
> error, brings to the minibuffer a default argument consisting in the
> concatenation of the current directory and the name of the buffer.

This patch implements this:

=== modified file 'lisp/files.el'
--- lisp/files.el	2012-07-17 18:01:44 +0000
+++ lisp/files.el	2012-08-03 08:04:07 +0000
@@ -4500,7 +4500,8 @@ (defun basic-save-buffer ()
 	  (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