diff options
| author | Paul Eggert | 2018-04-18 12:38:19 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-04-18 12:48:48 -0700 |
| commit | 403f3d2c85b98a15609b3e52411c175b5294f940 (patch) | |
| tree | 3a2cf6da03b2d1ba8fb525bdc52727c93f43af5d /src | |
| parent | 5dff4905d73d0d42447ff4b114d1af726a689c6a (diff) | |
| download | emacs-403f3d2c85b98a15609b3e52411c175b5294f940.tar.gz emacs-403f3d2c85b98a15609b3e52411c175b5294f940.zip | |
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).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c index 6eda7405409..9ddd8d5a7f6 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -3797,7 +3797,12 @@ string_to_number (char const *string, int base, int flags) | |||
| 3797 | value = n; | 3797 | value = n; |
| 3798 | 3798 | ||
| 3799 | if (! (state & DOT_CHAR) && ! (flags & S2N_OVERFLOW_TO_FLOAT)) | 3799 | if (! (state & DOT_CHAR) && ! (flags & S2N_OVERFLOW_TO_FLOAT)) |
| 3800 | xsignal1 (Qoverflow_error, build_string (string)); | 3800 | { |
| 3801 | AUTO_STRING (fmt, ("%s is out of fixnum range; " | ||
| 3802 | "maybe set `read-integer-overflow-as-float'?")); | ||
| 3803 | AUTO_STRING_WITH_LEN (arg, string, cp - string); | ||
| 3804 | xsignal1 (Qoverflow_error, CALLN (Fformat_message, fmt, arg)); | ||
| 3805 | } | ||
| 3801 | } | 3806 | } |
| 3802 | 3807 | ||
| 3803 | /* Either the number uses float syntax, or it does not fit into a fixnum. | 3808 | /* Either the number uses float syntax, or it does not fit into a fixnum. |