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: Eli Zaretskii
Subject: Re: Unexpected behavior of format-number with format-prompt
Date: Thu, 07 Nov 2024 16:47:40 +0200

> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: Joseph Turner <joseph@breatheoutbreathe.in>,  emacs-devel@gnu.org
> Date: Thu, 07 Nov 2024 14:50:27 +0100
> 
> > 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.
> 
> Maybe something like the attached patch is acceptable?  With it,
> evaluating each of the following prompts with "Enter (default 42): "
> 
> (read-number "Enter: " 42)
> (read-number (format-prompt "Enter" 42))
> (read-number (format-prompt "Enter" 42) 42)

This assumes that using the same format as
minibuffer-default-prompt-format necessarily means that format-prompt
is being used.  I'm not sure we can rely on that, it's too ad-hoc.



reply via email to

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