Subject: bug#73412: 31.0.50; Improve sql-read-product

From: Eli Zaretskii <[email-masked]>
Date: Sat, 21 Sep 2024 18:21:03 +0300

> Date: Sat, 21 Sep 2024 16:32:16 +0200
> From:  Stephen Berman via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 0. emacs -Q
> 1. C-u M-x sql-product-interactive RET
> 
> Now the minbuffer displays the following:
> 
> SQL product: ansi
> 
> so it you want to change the product, e.g. to postgres, you first have
> to delete "ansi".
> 
> Likewise, `M-x sql-set-product RET' produces the same minbuffer display,
> requiring deletion to change the product.
> 
> The reason "ansi" is displayed after the prompt is that the definition
> of sql-read-product uses the same non-nil value of the deprecated
> argument INITIAL-INPUT as is used for the argument DEF.  The attached
> patch makes INITIAL-INPUT nil, thus using only DEF, and also wraps the
> prompt argument of sql-read-product in format-prompt, so the default
> value is shown as part of the prompt and changing it does not require
> deletion.  The patch also adjusts the two callers of sql-read-product
> accordingly.

Thanks.

I think this should go to the emacs-30 branch, no?