From f42643852249a07acf9181aca37af351ff52bb5b Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Wed, 6 Nov 2024 11:54:31 -0800 Subject: [PATCH] Don't insert DEFAULT value into prompt * lisp/subr.el (read-number): Don't insert default value into prompt. --- lisp/subr.el | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index e630087b68f..aa37066609c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3424,20 +3424,12 @@ read-number-history (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. This function is used by the `interactive' code letter \"n\"." (let ((n nil) (default1 (if (consp default) (car default) default))) - (when default1 - (setq prompt - (if (string-match "\\(\\):[ \t]*\\'" prompt) - (replace-match (format minibuffer-default-prompt-format default1) t t prompt 1) - (replace-regexp-in-string "[ \t]*\\'" - (format minibuffer-default-prompt-format default1) - prompt t t)))) (while (progn (let ((str (read-from-minibuffer -- 2.46.0