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

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

bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt'


From: Dmitry Gutov
Subject: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt'
Date: Mon, 22 Mar 2021 02:48:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 22.03.2021 02:03, Gabriel wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:
Also note that project--completing-read-strict includes as (string-equal default
"") check added in 2be537e64.

Perhaps format-prompt could use it as well.

Do you mean to add a new check to 'format-prompt' to consider an empty
DEFAULT as nil, e.g., to not show it on minibuffer prompt in case the
value of the DEFAULT argument is an empty string ?

Yup.

Also, maybe another useful check for 'format-prompt' would remove the
": " suffix from the PROMPT argument, to avoid displaying something like
"prompt: : ", which could avoid regressions when migrating existing
code.

My (weak) preference would be on "no": whether the prompt is showing an extra ":" should be apparent from very brief testing of the code. It's not like it will show up only if DEFAULT is non-nil, for instance.

So no need to complicate the implementation.





reply via email to

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