summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el17
1 files changed, 5 insertions, 12 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index a137c504888..a9943ccd7f4 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -151,9 +151,7 @@ When called from lisp, FUNCTION may also be a function object."
(let* ((fn (function-called-at-point))
(enable-recursive-minibuffers t)
(val (completing-read
- (if fn
- (format "Describe function (default %s): " fn)
- "Describe function: ")
+ (format-prompt "Describe function" fn)
#'help--symbol-completion-table
(lambda (f) (or (fboundp f) (get f 'function-documentation)))
t nil nil
@@ -924,10 +922,7 @@ it is displayed along with the global value."
(orig-buffer (current-buffer))
val)
(setq val (completing-read
- (if (symbolp v)
- (format
- "Describe variable (default %s): " v)
- "Describe variable: ")
+ (format-prompt "Describe variable" (and (symbolp v) v))
#'help--symbol-completion-table
(lambda (vv)
;; In case the variable only exists in the buffer
@@ -1424,10 +1419,8 @@ current buffer and the selected frame, respectively."
(v-or-f (if found v-or-f (function-called-at-point)))
(found (or found v-or-f))
(enable-recursive-minibuffers t)
- (val (completing-read (if found
- (format
- "Describe symbol (default %s): " v-or-f)
- "Describe symbol: ")
+ (val (completing-read (format-prompt "Describe symbol"
+ (and found v-or-f))
#'help--symbol-completion-table
(lambda (vv)
(cl-some (lambda (x) (funcall (nth 1 x) vv))
@@ -1603,7 +1596,7 @@ keymap value."
(interactive
(let* ((km (help-fns--most-relevant-active-keymap))
(val (completing-read
- (format "Keymap (default %s): " km)
+ (format-prompt "Keymap" km)
obarray
(lambda (m) (and (boundp m) (keymapp (symbol-value m))))
t nil 'keymap-name-history