From: Juri Linkov Date: Tue, 21 May 2024 06:20:01 +0000 (+0300) Subject: Use read-string instead of completing-read for dired-do-touch X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b1d14b804edb1bc731ec29b2d054411c12c557b9;p=emacs.git Use read-string instead of completing-read for dired-do-touch * lisp/dired-aux.el (dired-mark-read-string): Use read-string when op-symbol is 'touch' (bug#70725). (cherry picked from commit d00eb1c90253d2a353d3e9730df37fdd81c2a3d2) --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 98a8f358199..d5f2876c3ee 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -647,10 +647,13 @@ values, passed as the seventh arg to `completing-read'. Optional arg COLLECTION is a collection of possible completions, passed as the second arg to `completing-read'." - (dired-mark-pop-up nil op-symbol files - 'completing-read - (format prompt (dired-mark-prompt arg files)) - collection nil nil initial nil default-value nil)) + (apply #'dired-mark-pop-up + nil op-symbol files + (if (eq op-symbol 'touch) 'read-string 'completing-read) + (format prompt (dired-mark-prompt arg files)) + (if (eq op-symbol 'touch) + `(,initial nil ,default-value nil) + `(,collection nil nil ,initial nil ,default-value nil)))) ;;; Cleaning a directory: flagging some backups for deletion