summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-11-28 16:43:45 +0000
committerGerd Moellmann <gerd@gnu.org>2000-11-28 16:43:45 +0000
commit75ab0c79df5e85f5ec97709d0d2bf6b5b8c9dc9d (patch)
tree5a175b75f2da22a4700b33cd9b0d53a9d4b7ce1f
parent0ad0386ebbe9725c6c750d1c2e7d22e57106aa16 (diff)
downloademacs-75ab0c79df5e85f5ec97709d0d2bf6b5b8c9dc9d.tar.gz
(dired-do-create-files): Construct default file
name for dired-mark-read-file-name so that when the user enters just RET, the target file will end up in the target directory.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/dired-aux.el8
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 72fced9d7e8..d142f4f8013 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2000-11-28 Gerd Moellmann <gerd@gnu.org>
+ * dired-aux.el (dired-do-create-files): Construct default file
+ name for dired-mark-read-file-name so that when the user enters
+ just RET, the target file will end up in the target directory.
+
* abbrev.el (prepare-abbrev-list-buffer): Get the value of
local-abbrev-table before changing buffers because it might
have a buffer-local binding.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 5097979725b..4b966711012 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1227,12 +1227,14 @@ Optional arg HOW-TO is used to set the value of the into-dir variable
(rfn-list (mapcar (function dired-make-relative) fn-list))
(dired-one-file ; fluid variable inside dired-create-files
(and (consp fn-list) (null (cdr fn-list)) (car fn-list)))
+ (target-dir (dired-dwim-target-directory))
+ (default (and dired-one-file
+ (expand-file-name (file-name-nondirectory (car fn-list))
+ target-dir)))
(target (expand-file-name ; fluid variable inside dired-create-files
(dired-mark-read-file-name
(concat (if dired-one-file op1 operation) " %s to: ")
- (dired-dwim-target-directory)
- op-symbol arg rfn-list
- (and dired-one-file (car fn-list)))))
+ target-dir op-symbol arg rfn-list default)))
(into-dir (cond ((null how-to)
;; Allow DOS/Windows users to change the letter
;; case of a directory. If we don't test these