* lisp/subr.el (read-number): Document collision with 'format-prompt'.
authorJoseph Turner <joseph@breatheoutbreathe.in>
Sat, 9 Nov 2024 19:15:25 +0000 (11:15 -0800)
committerEli Zaretskii <eliz@gnu.org>
Fri, 15 Nov 2024 12:28:51 +0000 (14:28 +0200)
lisp/subr.el

index 465795c75550765a4e6893e06546e7222bb8b029..2152f16ba95a66f988f092f8b6fda101b0aff870 100644 (file)
@@ -3419,9 +3419,10 @@ with Emacs.  Do not call it directly in your own packages."
 (defun read-number (prompt &optional default hist)
   "Read a numeric value in the minibuffer, prompting with PROMPT.
 DEFAULT specifies a default value to return if the user just types RET.
-The value of DEFAULT is inserted into PROMPT.
-HIST specifies a history list variable.  See `read-from-minibuffer'
-for details of the HIST argument.
+For historical reasons, the value of DEFAULT is always inserted into
+PROMPT, so it's recommended to use `format' instead of `format-prompt'
+to generate PROMPT.  HIST specifies a history list variable.  See
+`read-from-minibuffer' for details of the HIST argument.
 
 This function is used by the `interactive' code letter \"n\"."
   (let ((n nil)