[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Juri Linkov
Subject: bug#12128: 24.1.50; Default argument for `save-buffer'
Date: Fri, 03 Aug 2012 11:10:00 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (x86_64-pc-linux-gnu)

> 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
-                     (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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]