* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.
* lisp/help-fns.el (describe-function): Adjust the caller.
* lisp/minibuffer.el (format-prompt): Interpret a nil default
value as "no default".
@code{minibuffer-default-prompt-format} can be @samp{""}, in which
case no default values are displayed.
+
+If @var{default} is @code{nil}, there is no default value, and
+therefore no ``default value'' string is included in the result value.
@end defun
@node Object from Minibuffer
(let* ((fn (function-called-at-point))
(enable-recursive-minibuffers t)
(val (completing-read
- (if fn
- (format-prompt "Describe function" fn)
- "Describe function: ")
+ (format-prompt "Describe function" fn)
#'help--symbol-completion-table
(lambda (f) (or (fboundp f) (get f 'function-documentation)))
t nil nil
If FORMAT-ARGS is nil, PROMPT is used as a plain string. If
FORMAT-ARGS is non-nil, PROMPT is used as a format control
string, and FORMAT-ARGS are the arguments to be substituted into
-it. See `format' for details."
+it. See `format' for details.
+
+If DEFAULT is nil, no \"default value\" string is included in the
+return value."
(concat
(if (null format-args)
prompt
(apply #'format prompt format-args))
- (format minibuffer-default-prompt-format default)
+ (and default
+ (format minibuffer-default-prompt-format default))
": "))
(provide 'minibuffer)