summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/elp.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/emacs-lisp/elp.el
parent3444f397c7d20ca59f7b18f6fe95aa79b33727e5 (diff)
downloademacs-660d13bd7b47c1b7db990adcc671b55b6f1f83f2.tar.gz
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/emacs-lisp/elp.el')
-rw-r--r--lisp/emacs-lisp/elp.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index f68c0faf09d..a94978ac47b 100644
--- a/lisp/emacs-lisp/elp.el
+++ b/lisp/emacs-lisp/elp.el
@@ -342,9 +342,9 @@ Use optional LIST if provided instead."
(interactive
(list
(intern
- (completing-read "Master function: " obarray
- #'elp--instrumented-p
- t nil nil (if elp-master (symbol-name elp-master))))))
+ (let ((default (if elp-master (symbol-name elp-master))))
+ (completing-read (format-prompt "Master function" default)
+ obarray #'elp--instrumented-p t nil nil default)))))
;; When there's a master function, recording is turned off by default.
(setq elp-master funsym
elp-record-p nil)