summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-04-24 10:31:43 -0700
committerGlenn Morris <rgm@gnu.org>2013-04-24 10:31:43 -0700
commite5271cf20c08ba88e5c91a9626c08022f9a5058c (patch)
treed66663d64d84b5daf06faf9067cbfcb3da7e61a6 /lisp/subr.el
parent70203c2ec17efdb68b0873e4a62e2862a347e095 (diff)
downloademacs-e5271cf20c08ba88e5c91a9626c08022f9a5058c.tar.gz
emacs-e5271cf20c08ba88e5c91a9626c08022f9a5058c.tar.bz2
emacs-e5271cf20c08ba88e5c91a9626c08022f9a5058c.zip
* subr.el (read-number): Once more use `read'
rather than `string-to-number', to trap non-numeric input. Fixes: debbugs:14254
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index eef8c46c7d6..88f27c75764 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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.")