emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1921d21 2/3: Use format-prompt in calls to read-from-minibuffer w


From: Lars Ingebrigtsen
Subject: master 1921d21 2/3: Use format-prompt in calls to read-from-minibuffer with default value
Date: Sun, 6 Sep 2020 17:21:33 -0400 (EDT)

branch: master
commit 1921d2176bb9127d2483a1c8a470abfc3f4eec33
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Use format-prompt in calls to read-from-minibuffer with default value
    
    * 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  | 12 ++++++------
 lisp/tab-bar.el |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 376585d..bc92ecf 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index d8f932e..56c936e 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -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))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]