Subject: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy)

From: Juri Linkov <[email-masked]>
Date: Mon, 07 Sep 2020 21:46:11 +0300

> The next step here is probably to fix the cases where there's a default,
> but where the prompt doesn't mention them.  Like:

Are you sure about this change in 1921d2176b?

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index d8f932e7a4..56c936e773 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1028,7 +1028,7 @@ tab-bar-rename-tab
           (tab-index (or current-prefix-arg (1+ (tab-bar--current-tab-index tabs))))
           (tab-name (alist-get 'name (nth (1- tab-index) tabs))))
      (list (read-from-minibuffer
-            "New name for tab (leave blank for automatic naming): "
+            (format-prompt "New name for tab" tab-name)
             nil nil nil nil tab-name)
            current-prefix-arg)))
   (let* ((tabs (funcall tab-bar-tabs-function))
@@ -1057,7 +1057,7 @@ tab-bar-rename-tab-by-name
                                               (alist-get 'name tab))
                                             (funcall tab-bar-tabs-function)))))
      (list tab-name (read-from-minibuffer
-                     "New name for tab (leave blank for automatic naming): "
+                     (format-prompt "New name for tab" tab-name)
                      nil nil nil nil tab-name))))
   (tab-bar-rename-tab new-name (1+ (tab-bar--tab-index-by-name tab-name))))

I'm not the author of this code, so I don't know how it should work,
but the old prompt with text "leave blank for automatic naming"
makes sense to me.