emacs-devel
[Top][All Lists]
Advanced

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

Re: Unexpected behavior of format-number with format-prompt


From: Joseph Turner
Subject: Re: Unexpected behavior of format-number with format-prompt
Date: Wed, 06 Nov 2024 23:44:00 -0800


On November 6, 2024 11:36:42 PM PST, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Joseph Turner <joseph@breatheoutbreathe.in>
>> Date: Wed, 06 Nov 2024 12:06:02 -0800
>> 
>> When used with `read-string' (and other read-* functions),
>> `format-prompt' DTRT:
>> 
>> (let ((default "foo"))
>>   (read-string (format-prompt "Read" default) default))
>> 
>> The prompt looks like: "Read (default foo): "
>> 
>> However, `read-number' adds its own default argument:
>> 
>> (let ((default 1))
>>   (read-number (format-prompt "Read" default) default))
>> 
>> Prompt looks like: "Read (default 1) (default 1): "
>> 
>> This patch makes the behavior of `read-number' consistent with other
>> read-* functions:
>
>Thanks.
>
>First, this should have been sent to our issue tracker, via
>report-emacs-bug or submit-emacs-patch.

Got it.  Shall I do this now?

>More to the point: we cannot possibly change the behavior of
>read-number in such a backward-incompatible way.  Especially since
>this behavior is old, and explicitly called out in the doc string.  It
>is perhaps unfortunate that read-number behaves differently in this
>manner, but I'm afraid we will have to live with this.

That makes sense.  Can we apply the info manual change?



reply via email to

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