diff options
| -rw-r--r-- | lisp/dired-aux.el | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index aede83e61cc..121bebeb651 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -707,29 +707,28 @@ can be produced by `dired-get-marked-files', for example." | |||
| 707 | (let* ((on-each (not (string-match-p dired-star-subst-regexp command))) | 707 | (let* ((on-each (not (string-match-p dired-star-subst-regexp command))) |
| 708 | (no-subst (not (string-match-p dired-quark-subst-regexp command))) | 708 | (no-subst (not (string-match-p dired-quark-subst-regexp command))) |
| 709 | (star (string-match-p "\\*" command)) | 709 | (star (string-match-p "\\*" command)) |
| 710 | (qmark (string-match-p "\\?" command))) | 710 | (qmark (string-match-p "\\?" command)) |
| 711 | ;; Get confirmation for wildcards that may have been meant | 711 | ;; Get confirmation for wildcards that may have been meant |
| 712 | ;; to control substitution of a file name or the file name list. | 712 | ;; to control substitution of a file name or the file name list. |
| 713 | (if (cond ((not (or on-each no-subst)) | 713 | (ok (cond ((not (or on-each no-subst)) |
| 714 | (error "You can not combine `*' and `?' substitution marks")) | 714 | (error "You can not combine `*' and `?' substitution marks")) |
| 715 | ((and star on-each) | 715 | ((and star on-each) |
| 716 | (y-or-n-p (format-message | 716 | (y-or-n-p (format-message |
| 717 | "Confirm--do you mean to use `*' as a wildcard? "))) | 717 | "Confirm--do you mean to use `*' as a wildcard? "))) |
| 718 | ((and qmark no-subst) | 718 | ((and qmark no-subst) |
| 719 | (y-or-n-p (format-message | 719 | (y-or-n-p (format-message |
| 720 | "Confirm--do you mean to use `?' as a wildcard? "))) | 720 | "Confirm--do you mean to use `?' as a wildcard? "))) |
| 721 | (t)) | 721 | (t)))) |
| 722 | (if on-each | 722 | (when ok |
| 723 | (dired-bunch-files | 723 | (if on-each |
| 724 | (- 10000 (length command)) | 724 | (dired-bunch-files (- 10000 (length command)) |
| 725 | (lambda (&rest files) | 725 | (lambda (&rest files) |
| 726 | (dired-run-shell-command | 726 | (dired-run-shell-command |
| 727 | (dired-shell-stuff-it command files t arg))) | 727 | (dired-shell-stuff-it command files t arg))) |
| 728 | nil | 728 | nil file-list) |
| 729 | file-list) | 729 | ;; execute the shell command |
| 730 | ;; execute the shell command | 730 | (dired-run-shell-command |
| 731 | (dired-run-shell-command | 731 | (dired-shell-stuff-it command file-list nil arg)))))) |
| 732 | (dired-shell-stuff-it command file-list nil arg)))))) | ||
| 733 | 732 | ||
| 734 | ;; Might use {,} for bash or csh: | 733 | ;; Might use {,} for bash or csh: |
| 735 | (defvar dired-mark-prefix "" | 734 | (defvar dired-mark-prefix "" |