diff options
| author | Paul Eggert | 2019-07-23 01:42:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-23 01:46:41 -0700 |
| commit | dfb0ba79b5f41ca6fed25a03d2a5cd6996ec4753 (patch) | |
| tree | 87426b1fde8da618b4e7657b09bc256f5c011dcc /doc/lispref/strings.texi | |
| parent | 56a3e4a5d366a8453608d9a604ebd5ddb4e52245 (diff) | |
| download | emacs-dfb0ba79b5f41ca6fed25a03d2a5cd6996ec4753.tar.gz emacs-dfb0ba79b5f41ca6fed25a03d2a5cd6996ec4753.zip | |
Support "%x" etc. formats on more floats
* doc/lispref/strings.texi (Formatting Strings): Document this.
* src/editfns.c (styled_format): Support %o, %x, and %X on
finite floats less than zero or greater than UINTMAX_MAX.
* test/src/editfns-tests.el (format-%x-large-float)
(read-large-integer, format-%o-negative-float):
Adjust tests to match extended behavior.
Rename the latter test from format-%o-invalid-float,
since the float is no longer invalid.
* test/src/editfns-tests.el (format-%x-large-float)
(read-large-integer): Test this.
Diffstat (limited to 'doc/lispref/strings.texi')
| -rw-r--r-- | doc/lispref/strings.texi | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 521f163663d..69d571fab8a 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -923,9 +923,8 @@ Functions}). Thus, strings are enclosed in @samp{"} characters, and | |||
| 923 | @cindex integer to octal | 923 | @cindex integer to octal |
| 924 | Replace the specification with the base-eight representation of an | 924 | Replace the specification with the base-eight representation of an |
| 925 | integer. Negative integers are formatted in a platform-dependent | 925 | integer. Negative integers are formatted in a platform-dependent |
| 926 | way. The object can also be a nonnegative floating-point | 926 | way. The object can also be a floating-point number that is formatted |
| 927 | number that is formatted as an integer, dropping any fraction, if the | 927 | as an integer, dropping any fraction. |
| 928 | integer does not exceed machine limits. | ||
| 929 | 928 | ||
| 930 | @item %d | 929 | @item %d |
| 931 | Replace the specification with the base-ten representation of a signed | 930 | Replace the specification with the base-ten representation of a signed |
| @@ -938,9 +937,8 @@ formatted as an integer, dropping any fraction. | |||
| 938 | Replace the specification with the base-sixteen representation of an | 937 | Replace the specification with the base-sixteen representation of an |
| 939 | integer. Negative integers are formatted in a platform-dependent | 938 | integer. Negative integers are formatted in a platform-dependent |
| 940 | way. @samp{%x} uses lower case and @samp{%X} uses upper | 939 | way. @samp{%x} uses lower case and @samp{%X} uses upper |
| 941 | case. The object can also be a nonnegative floating-point number that | 940 | case. The object can also be a floating-point number that is |
| 942 | is formatted as an integer, dropping any fraction, if the integer does | 941 | formatted as an integer, dropping any fraction. |
| 943 | not exceed machine limits. | ||
| 944 | 942 | ||
| 945 | @item %c | 943 | @item %c |
| 946 | Replace the specification with the character which is the value given. | 944 | Replace the specification with the character which is the value given. |