aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/strings.texi
diff options
context:
space:
mode:
authorPaul Eggert2019-07-23 01:42:32 -0700
committerPaul Eggert2019-07-23 01:46:41 -0700
commitdfb0ba79b5f41ca6fed25a03d2a5cd6996ec4753 (patch)
tree87426b1fde8da618b4e7657b09bc256f5c011dcc /doc/lispref/strings.texi
parent56a3e4a5d366a8453608d9a604ebd5ddb4e52245 (diff)
downloademacs-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.texi10
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
924Replace the specification with the base-eight representation of an 924Replace the specification with the base-eight representation of an
925integer. Negative integers are formatted in a platform-dependent 925integer. Negative integers are formatted in a platform-dependent
926way. The object can also be a nonnegative floating-point 926way. The object can also be a floating-point number that is formatted
927number that is formatted as an integer, dropping any fraction, if the 927as an integer, dropping any fraction.
928integer does not exceed machine limits.
929 928
930@item %d 929@item %d
931Replace the specification with the base-ten representation of a signed 930Replace the specification with the base-ten representation of a signed
@@ -938,9 +937,8 @@ formatted as an integer, dropping any fraction.
938Replace the specification with the base-sixteen representation of an 937Replace the specification with the base-sixteen representation of an
939integer. Negative integers are formatted in a platform-dependent 938integer. Negative integers are formatted in a platform-dependent
940way. @samp{%x} uses lower case and @samp{%X} uses upper 939way. @samp{%x} uses lower case and @samp{%X} uses upper
941case. The object can also be a nonnegative floating-point number that 940case. The object can also be a floating-point number that is
942is formatted as an integer, dropping any fraction, if the integer does 941formatted as an integer, dropping any fraction.
943not exceed machine limits.
944 942
945@item %c 943@item %c
946Replace the specification with the character which is the value given. 944Replace the specification with the character which is the value given.