diff options
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r-- | lisp/dired-aux.el | 55 |
1 files changed, 15 insertions, 40 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 64cdab28f9a..d16aee0fa86 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -797,7 +797,7 @@ offer a smarter default choice of shell command." ;;;###autoload (defcustom dired-confirm-shell-command t - "Whether to prompt for confirmation for ‘dired-do-shell-command’. + "Whether to prompt for confirmation for `dired-do-shell-command'. If non-nil, prompt for confirmation if the command contains potentially dangerous characters. If nil, never prompt for confirmation." :type 'boolean @@ -819,7 +819,9 @@ are executed in the background on each file sequentially waiting for each command to terminate before running the next command. In shell syntax this means separating the individual commands with `;'. -The output appears in the buffer named by `shell-command-buffer-name-async'." +The output appears in the buffer named by `shell-command-buffer-name-async'. + +Commands that are run asynchronously do not accept user input." (interactive (let ((files (dired-get-marked-files t current-prefix-arg nil nil t))) (list @@ -996,8 +998,15 @@ Also see the `dired-confirm-shell-command' variable." file-list dired-mark-separator))) (when (cdr file-list) (setq files (concat dired-mark-prefix files dired-mark-postfix))) - (funcall stuff-it files)))) - (or (and in-background "&") "")))) + (concat + (funcall stuff-it files) + ;; Be consistent in how we treat inputs to commands -- do + ;; the same here as in the `on-each' case. + (if (and in-background (not w32-shell)) + "&wait" + ""))))) + (or (and in-background "&") + "")))) ;; This is an extra function so that it can be redefined by ange-ftp. ;;;###autoload @@ -3199,41 +3208,7 @@ Intended to be added to `isearch-mode-hook'." The returned function narrows the search to match the search string only as part of a file name enclosed by the text property `dired-filename'. It's intended to override the default search function." - (let ((search-fun (funcall orig-fun)) - (property 'dired-filename)) - (lambda (string &optional bound noerror count) - (let* ((old (point)) - ;; Check if point is already on the property. - (beg (when (get-text-property - (if isearch-forward old (max (1- old) (point-min))) - property) - old)) - end found) - ;; Otherwise, try to search for the next property. - (unless beg - (setq beg (if isearch-forward - (next-single-property-change old property) - (previous-single-property-change old property))) - (when beg (goto-char beg))) - ;; Non-nil `beg' means there are more properties. - (while (and beg (not found)) - ;; Search for the end of the current property. - (setq end (if isearch-forward - (next-single-property-change beg property) - (previous-single-property-change beg property))) - (setq found (funcall - search-fun string (if bound (if isearch-forward - (min bound end) - (max bound end)) - end) - noerror count)) - (unless found - (setq beg (if isearch-forward - (next-single-property-change end property) - (previous-single-property-change end property))) - (when beg (goto-char beg)))) - (unless found (goto-char old)) - found)))) + (isearch-search-fun-in-text-property 'dired-filename (funcall orig-fun))) ;;;###autoload (defun dired-isearch-filenames () @@ -3293,7 +3268,7 @@ type \\[help-command] at that time. Third arg DELIMITED (prefix arg) means replace only word-delimited matches. If you exit the query-replace loop (\\[keyboard-quit], RET or q), you can -resume the query replace with the command \\[tags-loop-continue]." +resume the query replace with the command \\[fileloop-continue]." (interactive (let ((common (query-replace-read-args |