The read-number function is defined in XEmacs and not in Emacs.
If you place the following code (stolen from XEmacs) in your .emacs file you should be OK.
(defun read-number (&optional prompt default)
"Read a number from the minibuffer.
Optional arguments: PROMPT DEFAULT.
If DEFAULT is non-nil, it is written within parenthesis after the prompt.
DEFAULT can be either a number, or of the type which `(interactive P)'
generates."
(let ((numdefault (cond ((null default) nil)
((integerp default) default)
((listp default) (car default))
(t nil)))
(number nil)
(numstr nil))
Hi Bob, or anyone else who knows:
One of the chnages between 4.07 and 4.08
replaced (in br-env.el)
(string-to-int
(read-string (concat lang-prompt ": ") ""))))
with
(read-number (concat lang-prompt ": ") t)))
but under emacs21, at least, read-string is
not defined. Where should that come from?
Reverting the above change seems to work.
Thanks.
I'm having this exact same problem, and I'm noticing that this is far from the only place where read-string exists.
The read-number function is defined in XEmacs and not in Emacs.
If you place the following code (stolen from XEmacs) in your .emacs file you should be OK.
(defun read-number (&optional prompt default)
"Read a number from the minibuffer.
Optional arguments: PROMPT DEFAULT.
If DEFAULT is non-nil, it is written within parenthesis after the prompt.
DEFAULT can be either a number, or of the type which `(interactive P)'
generates."
(let ((numdefault (cond ((null default) nil)
((integerp default) default)
((listp default) (car default))
(t nil)))
(number nil)
(numstr nil))
(while (not number)
(setq numstr (read-string
(concat (if prompt
prompt
"Enter a number: ")
(if numdefault
(format "(%d) " numdefault)))))
(cond ((and (string= numstr "")
numdefault)
(setq number numdefault))
((string-match "\\`[0-9]+\\'" numstr)
(setq number (string-to-int numstr)))
(t (beep))))
number))