diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index cfc14be8ba0..f19dd6dd4d7 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -1036,6 +1036,7 @@ way. The object can also be a floating-point number that is formatted as an integer, dropping any fraction. @item %d +@itemx %i Replace the specification with the base-ten representation of a signed integer. The object can also be a floating-point number that is formatted as an integer, dropping any fraction. diff --git a/src/editfns.c b/src/editfns.c index ea71c3cda37..fc9162b12f9 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3312,7 +3312,7 @@ The format control string may contain %-sequences meaning to substitute the next available argument, or the argument explicitly specified: %s means produce a string argument. Actually, produces any object with `princ'. -%d means produce as signed number in decimal. +%d or %i means produce a signed number in decimal. %o means produce a number in octal. %x means produce a number in hex. %X is like %x, but uses upper case. @@ -3324,7 +3324,7 @@ the next available argument, or the argument explicitly specified: %c means produce a number as a single character. %S means produce any object as an s-expression (using `prin1'). -The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. +The argument used for %d, %i, %o, %x, %e, %f, %g or %c must be a number. %o, %x, and %X treat arguments as unsigned if `binary-as-unsigned' is t (this is experimental; email 32252@debbugs.gnu.org if you need it). Use %% to put a single % into the output.