aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorAndreas Schwab2007-11-16 00:17:40 +0000
committerAndreas Schwab2007-11-16 00:17:40 +0000
commit0e4df721fa28e3cfd9992fa6db0bd266fb94f5e7 (patch)
tree3f0a5650db65dcfa82b91a94c5ce6b19933da5d2 /src/editfns.c
parent8875d2c00e62b6cef44e2ca19627427103512dd9 (diff)
downloademacs-0e4df721fa28e3cfd9992fa6db0bd266fb94f5e7.tar.gz
emacs-0e4df721fa28e3cfd9992fa6db0bd266fb94f5e7.zip
Always take precision into account.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c
index eaee2bfadfa..fae485ae709 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3594,8 +3594,6 @@ usage: (format STRING &rest OBJECTS) */)
3594 /* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */ 3594 /* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */
3595 else if (INTEGERP (args[n]) && *format != 's') 3595 else if (INTEGERP (args[n]) && *format != 's')
3596 { 3596 {
3597 thissize = 30;
3598
3599 /* The following loop assumes the Lisp type indicates 3597 /* The following loop assumes the Lisp type indicates
3600 the proper way to pass the argument. 3598 the proper way to pass the argument.
3601 So make sure we have a flonum if the argument should 3599 So make sure we have a flonum if the argument should
@@ -3603,14 +3601,13 @@ usage: (format STRING &rest OBJECTS) */)
3603 if (*format == 'e' || *format == 'f' || *format == 'g') 3601 if (*format == 'e' || *format == 'f' || *format == 'g')
3604 { 3602 {
3605 args[n] = Ffloat (args[n]); 3603 args[n] = Ffloat (args[n]);
3606 if (precision[n] > 0)
3607 thissize += precision[n];
3608 } 3604 }
3609 else 3605 else
3610 if (*format != 'd' && *format != 'o' && *format != 'x' 3606 if (*format != 'd' && *format != 'o' && *format != 'x'
3611 && *format != 'i' && *format != 'X' && *format != 'c') 3607 && *format != 'i' && *format != 'X' && *format != 'c')
3612 error ("Invalid format operation %%%c", *format); 3608 error ("Invalid format operation %%%c", *format);
3613 3609
3610 thissize = 30 + (precision[n] > 0 ? precision[n] : 0);
3614 if (*format == 'c') 3611 if (*format == 'c')
3615 { 3612 {
3616 if (! SINGLE_BYTE_CHAR_P (XINT (args[n])) 3613 if (! SINGLE_BYTE_CHAR_P (XINT (args[n]))