diff options
| author | Paul Eggert | 2018-03-08 20:55:55 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-03-08 20:57:01 -0800 |
| commit | 80e145fc96765cc0a0f48ae2425294c8c92bce56 (patch) | |
| tree | 25664bb27068449a082973736e35e1c43bee249b /etc | |
| parent | cb0f6348956761880069e8ff7ed5086a177a521a (diff) | |
| download | emacs-80e145fc96765cc0a0f48ae2425294c8c92bce56.tar.gz emacs-80e145fc96765cc0a0f48ae2425294c8c92bce56.zip | |
Avoid losing info when formatting integers
* doc/lispref/numbers.texi (Integer Basics): Clarify that
out-of-range integers are treated as floating point only when the
integers are decimal.
* etc/NEWS: Mention changes.
* src/editfns.c (styled_format): Use %.0f when formatting %d or %i
values outside machine integer range, to avoid losing info.
Signal an error for %o or %x values that are too large to be
formatted, to avoid losing info.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 7 |
1 files changed, 7 insertions, 0 deletions
| @@ -302,6 +302,10 @@ as new-style, bind the new variable 'force-new-style-backquotes' to t. | |||
| 302 | 'cl-struct-define' whose name clashes with a builtin type (e.g., | 302 | 'cl-struct-define' whose name clashes with a builtin type (e.g., |
| 303 | 'integer' or 'hash-table') now signals an error. | 303 | 'integer' or 'hash-table') now signals an error. |
| 304 | 304 | ||
| 305 | ** When formatting a floating-point number as an octal or hexadecimal | ||
| 306 | integer, Emacs now signals an error if the number is too large for the | ||
| 307 | implementation to format (Bug#30408). | ||
| 308 | |||
| 305 | 309 | ||
| 306 | * Lisp Changes in Emacs 27.1 | 310 | * Lisp Changes in Emacs 27.1 |
| 307 | 311 | ||
| @@ -343,6 +347,9 @@ remote systems, which support this check. | |||
| 343 | If the optional third argument is non-nil, 'make-string' will produce | 347 | If the optional third argument is non-nil, 'make-string' will produce |
| 344 | a multibyte string even if its second argument is an ASCII character. | 348 | a multibyte string even if its second argument is an ASCII character. |
| 345 | 349 | ||
| 350 | ** (format "%d" X) no longer mishandles a floating-point number X that | ||
| 351 | does not fit in a machine integer (Bug#30408). | ||
| 352 | |||
| 346 | ** New JSON parsing and serialization functions 'json-serialize', | 353 | ** New JSON parsing and serialization functions 'json-serialize', |
| 347 | 'json-insert', 'json-parse-string', and 'json-parse-buffer'. These | 354 | 'json-insert', 'json-parse-string', and 'json-parse-buffer'. These |
| 348 | are implemented in C using the Jansson library. | 355 | are implemented in C using the Jansson library. |