summaryrefslogtreecommitdiff
path: root/lisp/tab-bar.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-09-06 20:35:11 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-09-06 20:35:11 +0200
commit660d13bd7b47c1b7db990adcc671b55b6f1f83f2 (patch)
treeb470b0f2fcba1f428556eb2cebe4988ccf4e294e /lisp/tab-bar.el
parent3444f397c7d20ca59f7b18f6fe95aa79b33727e5 (diff)
downloademacs-660d13bd7b47c1b7db990adcc671b55b6f1f83f2.tar.gz
emacs-660d13bd7b47c1b7db990adcc671b55b6f1f83f2.tar.bz2
emacs-660d13bd7b47c1b7db990adcc671b55b6f1f83f2.zip
Use format-prompt in calls to completing-read with a default value
* lisp/textmodes/rst.el (rst-insert-list-new-item): * lisp/tab-bar.el (tab-bar-switch-to-tab): * lisp/profiler.el (profiler-start): * lisp/frame.el (set-frame-font): * lisp/erc/erc.el (erc-join-channel): * lisp/emacs-lock.el (emacs-lock--set-mode): * lisp/emacs-lisp/elp.el (elp-set-master): * lisp/emacs-lisp/checkdoc.el () (checkdoc-this-string-valid-engine): * lisp/calendar/todo-mode.el (todo-find-filtered-items-file): * lisp/calendar/calendar.el (calendar-set-date-style): Use `format-prompt' in calls to completing-read that has a default value, but didn't mention that in the prompt.
Diffstat (limited to 'lisp/tab-bar.el')
-rw-r--r--lisp/tab-bar.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index cee88cb4275..d8f932e7a40 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -665,7 +665,8 @@ to get the name of the last visited tab, the second last, and so on."
(let* ((recent-tabs (mapcar (lambda (tab)
(alist-get 'name tab))
(tab-bar--tabs-recent))))
- (list (completing-read "Switch to tab by name (default recent): "
+ (list (completing-read (format-prompt "Switch to tab by name"
+ (car recent-tabs))
recent-tabs nil nil nil nil recent-tabs))))
(tab-bar-select-tab (1+ (or (tab-bar--tab-index-by-name name) 0))))