emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111345: * subr.el (read-number):


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111345: * subr.el (read-number): Once more use `read'
Date: Wed, 24 Apr 2013 10:31:43 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111345
fixes bug: http://debbugs.gnu.org/14254
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Wed 2013-04-24 10:31:43 -0700
message:
  * subr.el (read-number): Once more use `read'
  rather than `string-to-number', to trap non-numeric input.
modified:
  lisp/ChangeLog
  lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-04-22 14:11:37 +0000
+++ b/lisp/ChangeLog    2013-04-24 17:31:43 +0000
@@ -1,3 +1,8 @@
+2013-04-24  Glenn Morris  <address@hidden>
+
+       * 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  <address@hidden>
 
        * emacs-lisp/syntax.el (syntax-propertize-multiline):

=== modified file 'lisp/subr.el'
--- a/lisp/subr.el      2013-01-03 00:50:35 +0000
+++ b/lisp/subr.el      2013-04-24 17:31:43 +0000
@@ -2229,7 +2229,7 @@
            (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.")


reply via email to

[Prev in Thread] Current Thread [Next in Thread]