bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsi


From: Juri Linkov
Subject: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy)
Date: Thu, 27 Aug 2020 21:48:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Anyway, I went ahead and pushed this to Emacs 28,

Maybe the final separator (colon) should be customizable as well.
What if someone wants to use the same character as used in shell, i.e. '$'.
Then moving the currently hard-coded colon to the default value
" (default %s): " will allow the users to customize it to
" (default %s)$ "

> but I've only converted two (2) of the (at least) couple hundreds of
> callers, because I wanted to see if there were any further comments on
> the concept (or the interface) before digging into the rest of the
> call sites.

Shouldn't one of these calls (namely 'describe-function') be further
simplified with

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index d302c05283..617f6ae5e8 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -151,9 +151,7 @@ describe-function
    (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

But something is still wrong - with the nil default value the prompt becomes:

  "Describe function (default nil): "

whereas it should be

  "Describe function: "

It seems 'format-prompt' should not use 'minibuffer-default-prompt-format'
when 'default' is nil.





reply via email to

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