Mercurial > emacs
changeset 33966:aa4dc9792a0a
(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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 28 Nov 2000 16:43:10 +0000 |
parents | dcb6f87d8280 |
children | bce003819703 |
files | lisp/dired-aux.el |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired-aux.el Tue Nov 28 16:39:56 2000 +0000 +++ b/lisp/dired-aux.el Tue Nov 28 16:43:10 2000 +0000 @@ -1227,12 +1227,14 @@ (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