mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-14 09:39:42 +00:00
Tell user about read-integer-overflow-as-float
* src/lread.c (string_to_number): Suggest read-integer-overflow-as-float in signal message. Suggested by Stefan Monnier (Bug#31118#58).
This commit is contained in:
parent
5dff4905d7
commit
403f3d2c85
@ -3797,7 +3797,12 @@ string_to_number (char const *string, int base, int flags)
|
||||
value = n;
|
||||
|
||||
if (! (state & DOT_CHAR) && ! (flags & S2N_OVERFLOW_TO_FLOAT))
|
||||
xsignal1 (Qoverflow_error, build_string (string));
|
||||
{
|
||||
AUTO_STRING (fmt, ("%s is out of fixnum range; "
|
||||
"maybe set `read-integer-overflow-as-float'?"));
|
||||
AUTO_STRING_WITH_LEN (arg, string, cp - string);
|
||||
xsignal1 (Qoverflow_error, CALLN (Fformat_message, fmt, arg));
|
||||
}
|
||||
}
|
||||
|
||||
/* Either the number uses float syntax, or it does not fit into a fixnum.
|
||||
|
Loading…
Reference in New Issue
Block a user