]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak prompt when symlinking in dired
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 26 Jul 2019 09:12:03 +0000 (11:12 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 26 Jul 2019 09:12:03 +0000 (11:12 +0200)
* lisp/dired-aux.el (dired-do-create-files): Fix prompt when
sym/hardlinking (bug#26870).

lisp/dired-aux.el

index 09850198ca543836f9235e169b844df59079e6e3..30a941c7bb647015a52d2841b6f48d56c7c7660b 100644 (file)
@@ -1898,7 +1898,14 @@ Optional arg HOW-TO determines how to treat the target.
                        (set (make-local-variable 'minibuffer-default-add-function) nil)
                        (setq minibuffer-default defaults))
                    (dired-mark-read-file-name
-                    (concat (if dired-one-file op1 operation) " %s to: ")
+                     (format "%s %%s %s: "
+                             (if dired-one-file op1 operation)
+                             (if (memq op-symbol '(symlink hardlink))
+                                 ;; Linking operations create links
+                                 ;; from the prompted file name; the
+                                 ;; other operations copy (etc) to the
+                                 ;; prompted file name.
+                                 "from" "to"))
                     target-dir op-symbol arg rfn-list default))))
         (into-dir
           (progn