aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 612893c377b..65c0c721d11 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3865,12 +3865,14 @@ The format control string may contain %-sequences meaning to substitute
3865the next available argument: 3865the next available argument:
3866 3866
3867%s means print a string argument. Actually, prints any object, with `princ'. 3867%s means print a string argument. Actually, prints any object, with `princ'.
3868%d means print as number in decimal (%o octal, %x hex). 3868%d means print as signed number in decimal.
3869%o means print as unsigned number in octal, %x as unsigned number in hex.
3869%X is like %x, but uses upper case. 3870%X is like %x, but uses upper case.
3870%e means print a number in exponential notation. 3871%e means print a number in exponential notation.
3871%f means print a number in decimal-point notation. 3872%f means print a number in decimal-point notation.
3872%g means print a number in exponential notation 3873%g means print a number in exponential notation if the exponent would be
3873 or decimal-point notation, whichever uses fewer characters. 3874 less than -4 or greater than or equal to the precision (default: 6);
3875 otherwise it prints in decimal-point notation.
3874%c means print a number as a single character. 3876%c means print a number as a single character.
3875%S means print any object as an s-expression (using `prin1'). 3877%S means print any object as an s-expression (using `prin1').
3876 3878
@@ -3893,8 +3895,10 @@ The - and 0 flags affect the width specifier, as described below.
3893The # flag means to use an alternate display form for %o, %x, %X, %e, 3895The # flag means to use an alternate display form for %o, %x, %X, %e,
3894%f, and %g sequences: for %o, it ensures that the result begins with 3896%f, and %g sequences: for %o, it ensures that the result begins with
3895\"0\"; for %x and %X, it prefixes the result with \"0x\" or \"0X\"; 3897\"0\"; for %x and %X, it prefixes the result with \"0x\" or \"0X\";
3896for %e, %f, and %g, it causes a decimal point to be included even if 3898for %e and %f, it causes a decimal point to be included even if the
3897the precision is zero. 3899the precision is zero; for %g, it causes a decimal point to be
3900included even if the the precision is zero, and also forces trailing
3901zeros after the decimal point to be left in place.
3898 3902
3899The width specifier supplies a lower limit for the length of the 3903The width specifier supplies a lower limit for the length of the
3900printed representation. The padding, if any, normally goes on the 3904printed representation. The padding, if any, normally goes on the
@@ -3903,10 +3907,12 @@ character is normally a space, but it is 0 if the 0 flag is present.
3903The 0 flag is ignored if the - flag is present, or the format sequence 3907The 0 flag is ignored if the - flag is present, or the format sequence
3904is something other than %d, %e, %f, and %g. 3908is something other than %d, %e, %f, and %g.
3905 3909
3906For %e, %f, and %g sequences, the number after the "." in the 3910For %e and %f sequences, the number after the "." in the precision
3907precision specifier says how many decimal places to show; if zero, the 3911specifier says how many decimal places to show; if zero, the decimal
3908decimal point itself is omitted. For %s and %S, the precision 3912point itself is omitted. For %g, the precision specifies how many
3909specifier truncates the string to the given width. 3913significant digits to print; zero or omitted are treated as 1.
3914For %s and %S, the precision specifier truncates the string to the
3915given width.
3910 3916
3911Text properties, if any, are copied from the format-string to the 3917Text properties, if any, are copied from the format-string to the
3912produced text. 3918produced text.