Subject: Re: bug#30285: dired-do-chmod vs. top line of dired

From: Tino Calancha <[email-masked]>
Date: Thu, 01 Feb 2018 18:17:43 +0900

Tino Calancha <[email-masked]> writes:

Below the lines

-   (let ((files (dired-get-marked-files t current-prefix-arg)))

must not be deleted (its a typo), otherwise `files' is unbound.
Sorry for the typo (the train was really crowdy!) :-|

  (defun dired-mark-read-string (prompt initial op-symbol arg files
  			       &optional default-value collection)
@@ -666,7 +671,7 @@ dired-do-async-shell-command

  The output appears in the buffer `*Async Shell Command*'."
    (interactive
-   (let ((files (dired-get-marked-files t current-prefix-arg)))
+   (dired-with-dired-do
       (list
        ;; Want to give feedback whether this file or marked files are used:
        (dired-read-shell-command "& on %s: " current-prefix-arg files)
@@ -727,7 +732,7 @@ dired-do-shell-command
  ;;Functions dired-run-shell-command and dired-shell-stuff-it do the
  ;;actual work and can be redefined for customization.
    (interactive
-   (let ((files (dired-get-marked-files t current-prefix-arg)))
+   (dired-with-dired-do
       (list
        ;; Want to give feedback whether this file or marked files are used:
        (dired-read-shell-command "! on %s: " current-prefix-arg files)