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

From: Dmitry Gutov <[email-masked]>
Date: Mon, 22 Mar 2021 02:48:56 +0200

On 22.03.2021 02:03, Gabriel wrote:
> Dmitry Gutov <[email-masked]> 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.