aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2014-01-26 11:44:23 -0800
committerPaul Eggert2014-01-26 11:44:23 -0800
commit12cb2b063b93f17c8eed86cbf01f9df73e210626 (patch)
treea1232d5ef5792057b79316401513ed096abf8118
parent748650f08713a4ad2c130e39d672ba64bcab4f24 (diff)
downloademacs-12cb2b063b93f17c8eed86cbf01f9df73e210626.tar.gz
emacs-12cb2b063b93f17c8eed86cbf01f9df73e210626.zip
* data.c (Fstring_to_number): Document results if unparsable.
Fixes: debbugs:16551
-rw-r--r--src/ChangeLog5
-rw-r--r--src/data.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4ed9ef9d2cf..4fa19d98f7f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12014-01-26 Paul Eggert <eggert@cs.ucla.edu>
2
3 * data.c (Fstring_to_number): Document results if unparsable
4 (Bug#16551).
5
12014-01-26 Jan Djärv <jan.h.d@swipnet.se> 62014-01-26 Jan Djärv <jan.h.d@swipnet.se>
2 7
3 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540) 8 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
diff --git a/src/data.c b/src/data.c
index 2a64c1bbf82..91a1d8b75fb 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2523,12 +2523,12 @@ NUMBER may be an integer or a floating point number. */)
2523 2523
2524DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0, 2524DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0,
2525 doc: /* Parse STRING as a decimal number and return the number. 2525 doc: /* Parse STRING as a decimal number and return the number.
2526This parses both integers and floating point numbers. 2526Ignore leading spaces and tabs, and all trailing chars. Return 0 if
2527It ignores leading spaces and tabs, and all trailing chars. 2527STRING cannot be parsed as an integer or floating point number.
2528 2528
2529If BASE, interpret STRING as a number in that base. If BASE isn't 2529If BASE, interpret STRING as a number in that base. If BASE isn't
2530present, base 10 is used. BASE must be between 2 and 16 (inclusive). 2530present, base 10 is used. BASE must be between 2 and 16 (inclusive).
2531If the base used is not 10, STRING is always parsed as integer. */) 2531If the base used is not 10, STRING is always parsed as an integer. */)
2532 (register Lisp_Object string, Lisp_Object base) 2532 (register Lisp_Object string, Lisp_Object base)
2533{ 2533{
2534 register char *p; 2534 register char *p;