diff options
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/editfns.c b/src/editfns.c index 3b1c21a1781..4ea70253793 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -4691,21 +4691,16 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4691 | } | 4691 | } |
| 4692 | else | 4692 | else |
| 4693 | { | 4693 | { |
| 4694 | if (FIXNUMP (arg)) | 4694 | if (INTEGERP (arg)) |
| 4695 | ldarg = XFIXNUM (arg); | ||
| 4696 | else | ||
| 4697 | { | 4695 | { |
| 4698 | intmax_t iarg = bignum_to_intmax (arg); | 4696 | intmax_t iarg; |
| 4699 | if (iarg != 0) | 4697 | uintmax_t uarg; |
| 4698 | if (integer_to_intmax (arg, &iarg)) | ||
| 4700 | ldarg = iarg; | 4699 | ldarg = iarg; |
| 4700 | else if (integer_to_uintmax (arg, &uarg)) | ||
| 4701 | ldarg = uarg; | ||
| 4701 | else | 4702 | else |
| 4702 | { | 4703 | format_bignum_as_double = true; |
| 4703 | uintmax_t uarg = bignum_to_uintmax (arg); | ||
| 4704 | if (uarg != 0) | ||
| 4705 | ldarg = uarg; | ||
| 4706 | else | ||
| 4707 | format_bignum_as_double = true; | ||
| 4708 | } | ||
| 4709 | } | 4704 | } |
| 4710 | if (!format_bignum_as_double) | 4705 | if (!format_bignum_as_double) |
| 4711 | { | 4706 | { |