]> git.eshelyaron.com Git - emacs.git/commitdiff
Use format-prompt in calls to read-from-minibuffer with default value
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 6 Sep 2020 21:11:17 +0000 (23:11 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 6 Sep 2020 21:19:43 +0000 (23:19 +0200)
* lisp/tab-bar.el (tab-bar-rename-tab)
(tab-bar-rename-tab-by-name):
* lisp/simple.el (next-matching-history-element): Use
format-prompt in calls to read-from-minibuffer with at default
value.

lisp/simple.el
lisp/tab-bar.el

index 376585d8e82ffd08270c0b72118f6b743b5d6668..bc92ecf8e553a5f5c3a3670d5c56151a4282e24e 100644 (file)
@@ -2200,12 +2200,12 @@ Normally, history elements are matched case-insensitively if
 makes the search case-sensitive."
   (interactive
    (let* ((enable-recursive-minibuffers t)
-         (regexp (read-from-minibuffer "Next element matching (regexp): "
-                                       nil
-                                       minibuffer-local-map
-                                       nil
-                                       'minibuffer-history-search-history
-                                       (car minibuffer-history-search-history))))
+         (regexp (read-from-minibuffer
+                   (format-prompt "Next element matching (regexp)"
+                                  (car minibuffer-history-search-history))
+                  nil minibuffer-local-map nil
+                  'minibuffer-history-search-history
+                   (car minibuffer-history-search-history))))
      ;; Use the last regexp specified, by default, if input is empty.
      (list (if (string= regexp "")
               (if minibuffer-history-search-history
index d8f932e7a4093890def15a67d654d16bc9810b9c..56c936e773d9821ca89ccc92bca6c26a05a651d6 100644 (file)
@@ -1028,7 +1028,7 @@ function `tab-bar-tab-name-function'."
           (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 @@ function `tab-bar-tab-name-function'."
                                               (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))))