comparison lisp/subr.el @ 77359:d57bf0ca865e

(read-number): Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Sat, 21 Apr 2007 08:55:41 +0000
parents 055a54275ec3
children 954d7a5a16f6
comparison
equal deleted inserted replaced
77358:9f725c1d891f 77359:d57bf0ca865e
1717 (message nil) 1717 (message nil)
1718 (or pass default ""))))) 1718 (or pass default "")))))
1719 1719
1720 ;; This should be used by `call-interactively' for `n' specs. 1720 ;; This should be used by `call-interactively' for `n' specs.
1721 (defun read-number (prompt &optional default) 1721 (defun read-number (prompt &optional default)
1722 "Read a numeric value in the minibuffer, prompting with PROMPT.
1723 DEFAULT specifies a default value to return if the user just types RET.
1724 The value of DEFAULT is inserted into PROMPT."
1722 (let ((n nil)) 1725 (let ((n nil))
1723 (when default 1726 (when default
1724 (setq prompt 1727 (setq prompt
1725 (if (string-match "\\(\\):[ \t]*\\'" prompt) 1728 (if (string-match "\\(\\):[ \t]*\\'" prompt)
1726 (replace-match (format " (default %s)" default) t t prompt 1) 1729 (replace-match (format " (default %s)" default) t t prompt 1)