* subr.el (read-number): Once more use `read'

rather than `string-to-number', to trap non-numeric input.

Fixes: debbugs:14254
This commit is contained in:
Glenn Morris 2013-04-24 10:31:43 -07:00
parent 70203c2ec1
commit e5271cf20c
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-04-24 Glenn Morris <rgm@gnu.org>
* subr.el (read-number): Once more use `read' rather than
`string-to-number', to trap non-numeric input. (Bug#14254)
2013-04-22 Erik Charlebois <erikcharlebois@gmail.com>
* emacs-lisp/syntax.el (syntax-propertize-multiline):

View file

@ -2229,7 +2229,7 @@ The value of DEFAULT is inserted into PROMPT."
(condition-case nil
(setq n (cond
((zerop (length str)) default1)
((stringp str) (string-to-number str))))
((stringp str) (read str))))
(error nil)))
(unless (numberp n)
(message "Please enter a number.")