]> git.eshelyaron.com Git - emacs.git/commitdiff
* data.c (Fstring_to_number): Document results if unparsable.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Jan 2014 19:44:23 +0000 (11:44 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Jan 2014 19:44:23 +0000 (11:44 -0800)
Fixes: debbugs:16551
src/ChangeLog
src/data.c

index 4ed9ef9d2cf1db6b9381f20e0d2077ce706bb09c..4fa19d98f7f0ef0db23e5ecf786c4cf2ccc3f742 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * data.c (Fstring_to_number): Document results if unparsable
+       (Bug#16551).
+
 2014-01-26  Jan Djärv  <jan.h.d@swipnet.se>
 
        * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
index 2a64c1bbf82f57a71a677a31573bb3d6c1912894..91a1d8b75fbf95f5c2b0e60defdfbcc71370008d 100644 (file)
@@ -2523,12 +2523,12 @@ NUMBER may be an integer or a floating point number.  */)
 
 DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0,
        doc: /* Parse STRING as a decimal number and return the number.
-This parses both integers and floating point numbers.
-It ignores leading spaces and tabs, and all trailing chars.
+Ignore leading spaces and tabs, and all trailing chars.  Return 0 if
+STRING cannot be parsed as an integer or floating point number.
 
 If BASE, interpret STRING as a number in that base.  If BASE isn't
 present, base 10 is used.  BASE must be between 2 and 16 (inclusive).
-If the base used is not 10, STRING is always parsed as integer.  */)
+If the base used is not 10, STRING is always parsed as an integer.  */)
   (register Lisp_Object string, Lisp_Object base)
 {
   register char *p;