]> git.eshelyaron.com Git - emacs.git/commitdiff
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)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 May 2024 08:29:46 +0000 (10:29 +0200)
* 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).

(cherry picked from commit ce8e292bca84f29cea540e3e23e88ec7a5d1674e)

lisp/dired-aux.el

index d5f2876c3ee16cf56a9cadadcabcaa06df5b7c00..82b85d83498ea8b70eb1ed0c2c4fd374dec444dd 100644 (file)
@@ -649,10 +649,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