Use read-from-minibuffer instead of read-string for dired-do-touch
authorJuri Linkov <juri@linkov.net>
Tue, 21 May 2024 17:22:31 +0000 (20:22 +0300)
committerJuri Linkov <juri@linkov.net>
Tue, 21 May 2024 17:22:31 +0000 (20:22 +0300)
* lisp/dired-aux.el (dired-mark-read-string): Use read-from-minibuffer
instead of read-string when op-symbol is 'touch', since it's more clear
when read-from-minibuffer returns an empty string for RET,
and it was used in dired-mark-read-string initially (bug#70725).

lisp/dired-aux.el

index b5eea4c74f68633c1e6fe544c393155346cbeaa6..22c6881ae350e6caa142a8d9d1760a61a6a8c9b5 100644 (file)
@@ -660,10 +660,10 @@ Optional arg COLLECTION is a collection of possible completions,
 passed as the second arg to `completing-read'."
   (apply #'dired-mark-pop-up
          nil op-symbol files
-         (if (eq op-symbol 'touch) 'read-string 'completing-read)
+         (if (eq op-symbol 'touch) 'read-from-minibuffer 'completing-read)
          (format prompt (dired-mark-prompt arg files))
          (if (eq op-symbol 'touch)
-             `(,initial nil ,default-value nil)
+             `(,initial nil nil nil ,default-value)
            `(,collection nil nil ,initial nil ,default-value nil))))
 
 \f