From: Joseph Turner Date: Sat, 9 Nov 2024 19:15:25 +0000 (-0800) Subject: * lisp/subr.el (read-number): Document collision with 'format-prompt'. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c4f507a011fc4c8e5c0d82cf1665055326778d37;p=emacs.git * lisp/subr.el (read-number): Document collision with 'format-prompt'. (cherry picked from commit c29c54410ea889bafc1bb4a29664827bc893b7d4) --- diff --git a/lisp/subr.el b/lisp/subr.el index f70eaac5b5f..051faa862ca 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3434,9 +3434,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)