From e52c37fad057b29d68c51cf3a70b2e0d94f656cb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 10 Jan 2012 21:24:02 -0500 Subject: [PATCH] * lisp/dired-aux.el (dired-do-shell-command): Fix */? logic. (Bug#6561) --- lisp/ChangeLog | 4 ++++ lisp/dired-aux.el | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f28fe36d34..7cdb5217c14 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-01-11 Glenn Morris + + * dired-aux.el (dired-do-shell-command): Fix */? logic. (Bug#6561) + 2012-01-10 Chong Yidong * net/network-stream.el (network-stream-open-starttls): Avoid diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 31d8afc4fca..19ed74b2078 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -605,16 +605,16 @@ can be produced by `dired-get-marked-files', for example." current-prefix-arg files))) (let* ((on-each (not (string-match dired-star-subst-regexp command))) - (subst (not (string-match dired-quark-subst-regexp command))) - (star (not (string-match "\\*" command))) - (qmark (not (string-match "\\?" command)))) + (no-subst (not (string-match dired-quark-subst-regexp command))) + (star (string-match "\\*" command)) + (qmark (string-match "\\?" command))) ;; Get confirmation for wildcards that may have been meant ;; to control substitution of a file name or the file name list. - (if (cond ((not (or on-each subst)) + (if (cond ((not (or on-each no-subst)) (error "You can not combine `*' and `?' substitution marks")) - ((and star (not on-each)) + ((and star on-each) (y-or-n-p "Confirm--do you mean to use `*' as a wildcard? ")) - ((and qmark (not subst)) + ((and qmark no-subst) (y-or-n-p "Confirm--do you mean to use `?' as a wildcard? ")) (t)) (if on-each -- 2.39.2