diff options
| author | Tom Tromey | 2018-08-11 13:34:17 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-08-11 13:34:17 -0600 |
| commit | 78ec68e18f07a90a9ad400683b973ff51baa80e1 (patch) | |
| tree | 638c986bf753e3ddab9992ba1ef0a10a3d4891f0 /src/editfns.c | |
| parent | ba1c4f63e3d2adbe9b590a3c51c2a0808c84723f (diff) | |
| parent | 79f59d41a3d2ef3b4a9a87265bf517206a5837ad (diff) | |
| download | emacs-78ec68e18f07a90a9ad400683b973ff51baa80e1.tar.gz emacs-78ec68e18f07a90a9ad400683b973ff51baa80e1.zip | |
Merge branch 'feature/bignum'
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 402 |
1 files changed, 211 insertions, 191 deletions
diff --git a/src/editfns.c b/src/editfns.c index a4cff595bd0..a0a66bd19ab 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -158,20 +158,20 @@ tzlookup (Lisp_Object zone, bool settz) | |||
| 158 | 158 | ||
| 159 | if (NILP (zone)) | 159 | if (NILP (zone)) |
| 160 | return local_tz; | 160 | return local_tz; |
| 161 | else if (EQ (zone, Qt) || EQ (zone, make_number (0))) | 161 | else if (EQ (zone, Qt) || EQ (zone, make_fixnum (0))) |
| 162 | { | 162 | { |
| 163 | zone_string = "UTC0"; | 163 | zone_string = "UTC0"; |
| 164 | new_tz = utc_tz; | 164 | new_tz = utc_tz; |
| 165 | } | 165 | } |
| 166 | else | 166 | else |
| 167 | { | 167 | { |
| 168 | bool plain_integer = INTEGERP (zone); | 168 | bool plain_integer = FIXNUMP (zone); |
| 169 | 169 | ||
| 170 | if (EQ (zone, Qwall)) | 170 | if (EQ (zone, Qwall)) |
| 171 | zone_string = 0; | 171 | zone_string = 0; |
| 172 | else if (STRINGP (zone)) | 172 | else if (STRINGP (zone)) |
| 173 | zone_string = SSDATA (ENCODE_SYSTEM (zone)); | 173 | zone_string = SSDATA (ENCODE_SYSTEM (zone)); |
| 174 | else if (plain_integer || (CONSP (zone) && INTEGERP (XCAR (zone)) | 174 | else if (plain_integer || (CONSP (zone) && FIXNUMP (XCAR (zone)) |
| 175 | && CONSP (XCDR (zone)))) | 175 | && CONSP (XCDR (zone)))) |
| 176 | { | 176 | { |
| 177 | Lisp_Object abbr; | 177 | Lisp_Object abbr; |
| @@ -181,7 +181,7 @@ tzlookup (Lisp_Object zone, bool settz) | |||
| 181 | zone = XCAR (zone); | 181 | zone = XCAR (zone); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | EMACS_INT abszone = eabs (XINT (zone)), hour = abszone / (60 * 60); | 184 | EMACS_INT abszone = eabs (XFIXNUM (zone)), hour = abszone / (60 * 60); |
| 185 | int hour_remainder = abszone % (60 * 60); | 185 | int hour_remainder = abszone % (60 * 60); |
| 186 | int min = hour_remainder / 60, sec = hour_remainder % 60; | 186 | int min = hour_remainder / 60, sec = hour_remainder % 60; |
| 187 | 187 | ||
| @@ -196,8 +196,8 @@ tzlookup (Lisp_Object zone, bool settz) | |||
| 196 | prec += 2, numzone = 100 * numzone + sec; | 196 | prec += 2, numzone = 100 * numzone + sec; |
| 197 | } | 197 | } |
| 198 | sprintf (tzbuf, tzbuf_format, prec, | 198 | sprintf (tzbuf, tzbuf_format, prec, |
| 199 | XINT (zone) < 0 ? -numzone : numzone, | 199 | XFIXNUM (zone) < 0 ? -numzone : numzone, |
| 200 | &"-"[XINT (zone) < 0], hour, min, sec); | 200 | &"-"[XFIXNUM (zone) < 0], hour, min, sec); |
| 201 | zone_string = tzbuf; | 201 | zone_string = tzbuf; |
| 202 | } | 202 | } |
| 203 | else | 203 | else |
| @@ -205,7 +205,7 @@ tzlookup (Lisp_Object zone, bool settz) | |||
| 205 | AUTO_STRING (leading, "<"); | 205 | AUTO_STRING (leading, "<"); |
| 206 | AUTO_STRING_WITH_LEN (trailing, tzbuf, | 206 | AUTO_STRING_WITH_LEN (trailing, tzbuf, |
| 207 | sprintf (tzbuf, trailing_tzbuf_format, | 207 | sprintf (tzbuf, trailing_tzbuf_format, |
| 208 | &"-"[XINT (zone) < 0], | 208 | &"-"[XFIXNUM (zone) < 0], |
| 209 | hour, min, sec)); | 209 | hour, min, sec)); |
| 210 | zone_string = SSDATA (concat3 (leading, ENCODE_SYSTEM (abbr), | 210 | zone_string = SSDATA (concat3 (leading, ENCODE_SYSTEM (abbr), |
| 211 | trailing)); | 211 | trailing)); |
| @@ -217,11 +217,11 @@ tzlookup (Lisp_Object zone, bool settz) | |||
| 217 | new_tz = tzalloc (zone_string); | 217 | new_tz = tzalloc (zone_string); |
| 218 | 218 | ||
| 219 | if (HAVE_TZALLOC_BUG && !new_tz && errno != ENOMEM && plain_integer | 219 | if (HAVE_TZALLOC_BUG && !new_tz && errno != ENOMEM && plain_integer |
| 220 | && XINT (zone) % (60 * 60) == 0) | 220 | && XFIXNUM (zone) % (60 * 60) == 0) |
| 221 | { | 221 | { |
| 222 | /* tzalloc mishandles POSIX strings; fall back on tzdb if | 222 | /* tzalloc mishandles POSIX strings; fall back on tzdb if |
| 223 | possible (Bug#30738). */ | 223 | possible (Bug#30738). */ |
| 224 | sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XINT (zone) / (60 * 60))); | 224 | sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XFIXNUM (zone) / (60 * 60))); |
| 225 | new_tz = tzalloc (zone_string); | 225 | new_tz = tzalloc (zone_string); |
| 226 | } | 226 | } |
| 227 | 227 | ||
| @@ -359,7 +359,7 @@ usage: (char-to-string CHAR) */) | |||
| 359 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | 359 | unsigned char str[MAX_MULTIBYTE_LENGTH]; |
| 360 | 360 | ||
| 361 | CHECK_CHARACTER (character); | 361 | CHECK_CHARACTER (character); |
| 362 | c = XFASTINT (character); | 362 | c = XFIXNAT (character); |
| 363 | 363 | ||
| 364 | len = CHAR_STRING (c, str); | 364 | len = CHAR_STRING (c, str); |
| 365 | return make_string_from_bytes ((char *) str, 1, len); | 365 | return make_string_from_bytes ((char *) str, 1, len); |
| @@ -370,10 +370,10 @@ DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, | |||
| 370 | (Lisp_Object byte) | 370 | (Lisp_Object byte) |
| 371 | { | 371 | { |
| 372 | unsigned char b; | 372 | unsigned char b; |
| 373 | CHECK_NUMBER (byte); | 373 | CHECK_FIXNUM (byte); |
| 374 | if (XINT (byte) < 0 || XINT (byte) > 255) | 374 | if (XFIXNUM (byte) < 0 || XFIXNUM (byte) > 255) |
| 375 | error ("Invalid byte"); | 375 | error ("Invalid byte"); |
| 376 | b = XINT (byte); | 376 | b = XFIXNUM (byte); |
| 377 | return make_string_from_bytes ((char *) &b, 1, 1); | 377 | return make_string_from_bytes ((char *) &b, 1, 1); |
| 378 | } | 378 | } |
| 379 | 379 | ||
| @@ -421,8 +421,8 @@ The return value is POSITION. */) | |||
| 421 | { | 421 | { |
| 422 | if (MARKERP (position)) | 422 | if (MARKERP (position)) |
| 423 | set_point_from_marker (position); | 423 | set_point_from_marker (position); |
| 424 | else if (INTEGERP (position)) | 424 | else if (FIXNUMP (position)) |
| 425 | SET_PT (clip_to_bounds (BEGV, XINT (position), ZV)); | 425 | SET_PT (clip_to_bounds (BEGV, XFIXNUM (position), ZV)); |
| 426 | else | 426 | else |
| 427 | wrong_type_argument (Qinteger_or_marker_p, position); | 427 | wrong_type_argument (Qinteger_or_marker_p, position); |
| 428 | return position; | 428 | return position; |
| @@ -448,9 +448,9 @@ region_limit (bool beginningp) | |||
| 448 | error ("The mark is not set now, so there is no region"); | 448 | error ("The mark is not set now, so there is no region"); |
| 449 | 449 | ||
| 450 | /* Clip to the current narrowing (bug#11770). */ | 450 | /* Clip to the current narrowing (bug#11770). */ |
| 451 | return make_number ((PT < XFASTINT (m)) == beginningp | 451 | return make_fixnum ((PT < XFIXNAT (m)) == beginningp |
| 452 | ? PT | 452 | ? PT |
| 453 | : clip_to_bounds (BEGV, XFASTINT (m), ZV)); | 453 | : clip_to_bounds (BEGV, XFIXNAT (m), ZV)); |
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, | 456 | DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, |
| @@ -539,7 +539,7 @@ i.e. the property that a char would inherit if it were inserted | |||
| 539 | at POSITION. */) | 539 | at POSITION. */) |
| 540 | (Lisp_Object position, register Lisp_Object prop, Lisp_Object object) | 540 | (Lisp_Object position, register Lisp_Object prop, Lisp_Object object) |
| 541 | { | 541 | { |
| 542 | CHECK_NUMBER_COERCE_MARKER (position); | 542 | CHECK_FIXNUM_COERCE_MARKER (position); |
| 543 | 543 | ||
| 544 | if (NILP (object)) | 544 | if (NILP (object)) |
| 545 | XSETBUFFER (object, current_buffer); | 545 | XSETBUFFER (object, current_buffer); |
| @@ -553,7 +553,7 @@ at POSITION. */) | |||
| 553 | return Fget_text_property (position, prop, object); | 553 | return Fget_text_property (position, prop, object); |
| 554 | else | 554 | else |
| 555 | { | 555 | { |
| 556 | EMACS_INT posn = XINT (position); | 556 | EMACS_INT posn = XFIXNUM (position); |
| 557 | ptrdiff_t noverlays; | 557 | ptrdiff_t noverlays; |
| 558 | Lisp_Object *overlay_vec, tem; | 558 | Lisp_Object *overlay_vec, tem; |
| 559 | struct buffer *obuf = current_buffer; | 559 | struct buffer *obuf = current_buffer; |
| @@ -606,8 +606,8 @@ at POSITION. */) | |||
| 606 | if (stickiness > 0) | 606 | if (stickiness > 0) |
| 607 | return Fget_text_property (position, prop, object); | 607 | return Fget_text_property (position, prop, object); |
| 608 | else if (stickiness < 0 | 608 | else if (stickiness < 0 |
| 609 | && XINT (position) > BUF_BEGV (XBUFFER (object))) | 609 | && XFIXNUM (position) > BUF_BEGV (XBUFFER (object))) |
| 610 | return Fget_text_property (make_number (XINT (position) - 1), | 610 | return Fget_text_property (make_fixnum (XFIXNUM (position) - 1), |
| 611 | prop, object); | 611 | prop, object); |
| 612 | else | 612 | else |
| 613 | return Qnil; | 613 | return Qnil; |
| @@ -650,13 +650,13 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, | |||
| 650 | if (NILP (pos)) | 650 | if (NILP (pos)) |
| 651 | XSETFASTINT (pos, PT); | 651 | XSETFASTINT (pos, PT); |
| 652 | else | 652 | else |
| 653 | CHECK_NUMBER_COERCE_MARKER (pos); | 653 | CHECK_FIXNUM_COERCE_MARKER (pos); |
| 654 | 654 | ||
| 655 | after_field | 655 | after_field |
| 656 | = get_char_property_and_overlay (pos, Qfield, Qnil, NULL); | 656 | = get_char_property_and_overlay (pos, Qfield, Qnil, NULL); |
| 657 | before_field | 657 | before_field |
| 658 | = (XFASTINT (pos) > BEGV | 658 | = (XFIXNAT (pos) > BEGV |
| 659 | ? get_char_property_and_overlay (make_number (XINT (pos) - 1), | 659 | ? get_char_property_and_overlay (make_fixnum (XFIXNUM (pos) - 1), |
| 660 | Qfield, Qnil, NULL) | 660 | Qfield, Qnil, NULL) |
| 661 | /* Using nil here would be a more obvious choice, but it would | 661 | /* Using nil here would be a more obvious choice, but it would |
| 662 | fail when the buffer starts with a non-sticky field. */ | 662 | fail when the buffer starts with a non-sticky field. */ |
| @@ -710,7 +710,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, | |||
| 710 | if (at_field_start) | 710 | if (at_field_start) |
| 711 | /* POS is at the edge of a field, and we should consider it as | 711 | /* POS is at the edge of a field, and we should consider it as |
| 712 | the beginning of the following field. */ | 712 | the beginning of the following field. */ |
| 713 | *beg = XFASTINT (pos); | 713 | *beg = XFIXNAT (pos); |
| 714 | else | 714 | else |
| 715 | /* Find the previous field boundary. */ | 715 | /* Find the previous field boundary. */ |
| 716 | { | 716 | { |
| @@ -722,7 +722,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, | |||
| 722 | 722 | ||
| 723 | p = Fprevious_single_char_property_change (p, Qfield, Qnil, | 723 | p = Fprevious_single_char_property_change (p, Qfield, Qnil, |
| 724 | beg_limit); | 724 | beg_limit); |
| 725 | *beg = NILP (p) ? BEGV : XFASTINT (p); | 725 | *beg = NILP (p) ? BEGV : XFIXNAT (p); |
| 726 | } | 726 | } |
| 727 | } | 727 | } |
| 728 | 728 | ||
| @@ -731,7 +731,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, | |||
| 731 | if (at_field_end) | 731 | if (at_field_end) |
| 732 | /* POS is at the edge of a field, and we should consider it as | 732 | /* POS is at the edge of a field, and we should consider it as |
| 733 | the end of the previous field. */ | 733 | the end of the previous field. */ |
| 734 | *end = XFASTINT (pos); | 734 | *end = XFIXNAT (pos); |
| 735 | else | 735 | else |
| 736 | /* Find the next field boundary. */ | 736 | /* Find the next field boundary. */ |
| 737 | { | 737 | { |
| @@ -742,7 +742,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary, | |||
| 742 | 742 | ||
| 743 | pos = Fnext_single_char_property_change (pos, Qfield, Qnil, | 743 | pos = Fnext_single_char_property_change (pos, Qfield, Qnil, |
| 744 | end_limit); | 744 | end_limit); |
| 745 | *end = NILP (pos) ? ZV : XFASTINT (pos); | 745 | *end = NILP (pos) ? ZV : XFIXNAT (pos); |
| 746 | } | 746 | } |
| 747 | } | 747 | } |
| 748 | } | 748 | } |
| @@ -795,7 +795,7 @@ is before LIMIT, then LIMIT will be returned instead. */) | |||
| 795 | { | 795 | { |
| 796 | ptrdiff_t beg; | 796 | ptrdiff_t beg; |
| 797 | find_field (pos, escape_from_edge, limit, &beg, Qnil, 0); | 797 | find_field (pos, escape_from_edge, limit, &beg, Qnil, 0); |
| 798 | return make_number (beg); | 798 | return make_fixnum (beg); |
| 799 | } | 799 | } |
| 800 | 800 | ||
| 801 | DEFUN ("field-end", Ffield_end, Sfield_end, 0, 3, 0, | 801 | DEFUN ("field-end", Ffield_end, Sfield_end, 0, 3, 0, |
| @@ -810,7 +810,7 @@ is after LIMIT, then LIMIT will be returned instead. */) | |||
| 810 | { | 810 | { |
| 811 | ptrdiff_t end; | 811 | ptrdiff_t end; |
| 812 | find_field (pos, escape_from_edge, Qnil, 0, limit, &end); | 812 | find_field (pos, escape_from_edge, Qnil, 0, limit, &end); |
| 813 | return make_number (end); | 813 | return make_fixnum (end); |
| 814 | } | 814 | } |
| 815 | 815 | ||
| 816 | DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, | 816 | DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, |
| @@ -856,13 +856,13 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) | |||
| 856 | XSETFASTINT (new_pos, PT); | 856 | XSETFASTINT (new_pos, PT); |
| 857 | } | 857 | } |
| 858 | 858 | ||
| 859 | CHECK_NUMBER_COERCE_MARKER (new_pos); | 859 | CHECK_FIXNUM_COERCE_MARKER (new_pos); |
| 860 | CHECK_NUMBER_COERCE_MARKER (old_pos); | 860 | CHECK_FIXNUM_COERCE_MARKER (old_pos); |
| 861 | 861 | ||
| 862 | fwd = (XINT (new_pos) > XINT (old_pos)); | 862 | fwd = (XFIXNUM (new_pos) > XFIXNUM (old_pos)); |
| 863 | 863 | ||
| 864 | prev_old = make_number (XINT (old_pos) - 1); | 864 | prev_old = make_fixnum (XFIXNUM (old_pos) - 1); |
| 865 | prev_new = make_number (XINT (new_pos) - 1); | 865 | prev_new = make_fixnum (XFIXNUM (new_pos) - 1); |
| 866 | 866 | ||
| 867 | if (NILP (Vinhibit_field_text_motion) | 867 | if (NILP (Vinhibit_field_text_motion) |
| 868 | && !EQ (new_pos, old_pos) | 868 | && !EQ (new_pos, old_pos) |
| @@ -872,16 +872,16 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) | |||
| 872 | previous positions; we could use `Fget_pos_property' | 872 | previous positions; we could use `Fget_pos_property' |
| 873 | instead, but in itself that would fail inside non-sticky | 873 | instead, but in itself that would fail inside non-sticky |
| 874 | fields (like comint prompts). */ | 874 | fields (like comint prompts). */ |
| 875 | || (XFASTINT (new_pos) > BEGV | 875 | || (XFIXNAT (new_pos) > BEGV |
| 876 | && !NILP (Fget_char_property (prev_new, Qfield, Qnil))) | 876 | && !NILP (Fget_char_property (prev_new, Qfield, Qnil))) |
| 877 | || (XFASTINT (old_pos) > BEGV | 877 | || (XFIXNAT (old_pos) > BEGV |
| 878 | && !NILP (Fget_char_property (prev_old, Qfield, Qnil)))) | 878 | && !NILP (Fget_char_property (prev_old, Qfield, Qnil)))) |
| 879 | && (NILP (inhibit_capture_property) | 879 | && (NILP (inhibit_capture_property) |
| 880 | /* Field boundaries are again a problem; but now we must | 880 | /* Field boundaries are again a problem; but now we must |
| 881 | decide the case exactly, so we need to call | 881 | decide the case exactly, so we need to call |
| 882 | `get_pos_property' as well. */ | 882 | `get_pos_property' as well. */ |
| 883 | || (NILP (Fget_pos_property (old_pos, inhibit_capture_property, Qnil)) | 883 | || (NILP (Fget_pos_property (old_pos, inhibit_capture_property, Qnil)) |
| 884 | && (XFASTINT (old_pos) <= BEGV | 884 | && (XFIXNAT (old_pos) <= BEGV |
| 885 | || NILP (Fget_char_property | 885 | || NILP (Fget_char_property |
| 886 | (old_pos, inhibit_capture_property, Qnil)) | 886 | (old_pos, inhibit_capture_property, Qnil)) |
| 887 | || NILP (Fget_char_property | 887 | || NILP (Fget_char_property |
| @@ -901,7 +901,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) | |||
| 901 | other side of NEW_POS, which would mean that NEW_POS is | 901 | other side of NEW_POS, which would mean that NEW_POS is |
| 902 | already acceptable, and it's not necessary to constrain it | 902 | already acceptable, and it's not necessary to constrain it |
| 903 | to FIELD_BOUND. */ | 903 | to FIELD_BOUND. */ |
| 904 | ((XFASTINT (field_bound) < XFASTINT (new_pos)) ? fwd : !fwd) | 904 | ((XFIXNAT (field_bound) < XFIXNAT (new_pos)) ? fwd : !fwd) |
| 905 | /* NEW_POS should be constrained, but only if either | 905 | /* NEW_POS should be constrained, but only if either |
| 906 | ONLY_IN_LINE is nil (in which case any constraint is OK), | 906 | ONLY_IN_LINE is nil (in which case any constraint is OK), |
| 907 | or NEW_POS and FIELD_BOUND are on the same line (in which | 907 | or NEW_POS and FIELD_BOUND are on the same line (in which |
| @@ -910,16 +910,16 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) | |||
| 910 | /* This is the ONLY_IN_LINE case, check that NEW_POS and | 910 | /* This is the ONLY_IN_LINE case, check that NEW_POS and |
| 911 | FIELD_BOUND are on the same line by seeing whether | 911 | FIELD_BOUND are on the same line by seeing whether |
| 912 | there's an intervening newline or not. */ | 912 | there's an intervening newline or not. */ |
| 913 | || (find_newline (XFASTINT (new_pos), -1, | 913 | || (find_newline (XFIXNAT (new_pos), -1, |
| 914 | XFASTINT (field_bound), -1, | 914 | XFIXNAT (field_bound), -1, |
| 915 | fwd ? -1 : 1, &shortage, NULL, 1), | 915 | fwd ? -1 : 1, &shortage, NULL, 1), |
| 916 | shortage != 0))) | 916 | shortage != 0))) |
| 917 | /* Constrain NEW_POS to FIELD_BOUND. */ | 917 | /* Constrain NEW_POS to FIELD_BOUND. */ |
| 918 | new_pos = field_bound; | 918 | new_pos = field_bound; |
| 919 | 919 | ||
| 920 | if (orig_point && XFASTINT (new_pos) != orig_point) | 920 | if (orig_point && XFIXNAT (new_pos) != orig_point) |
| 921 | /* The NEW_POS argument was originally nil, so automatically set PT. */ | 921 | /* The NEW_POS argument was originally nil, so automatically set PT. */ |
| 922 | SET_PT (XFASTINT (new_pos)); | 922 | SET_PT (XFIXNAT (new_pos)); |
| 923 | } | 923 | } |
| 924 | 924 | ||
| 925 | return new_pos; | 925 | return new_pos; |
| @@ -950,13 +950,13 @@ This function does not move point. */) | |||
| 950 | if (NILP (n)) | 950 | if (NILP (n)) |
| 951 | XSETFASTINT (n, 1); | 951 | XSETFASTINT (n, 1); |
| 952 | else | 952 | else |
| 953 | CHECK_NUMBER (n); | 953 | CHECK_FIXNUM (n); |
| 954 | 954 | ||
| 955 | scan_newline_from_point (XINT (n) - 1, &charpos, &bytepos); | 955 | scan_newline_from_point (XFIXNUM (n) - 1, &charpos, &bytepos); |
| 956 | 956 | ||
| 957 | /* Return END constrained to the current input field. */ | 957 | /* Return END constrained to the current input field. */ |
| 958 | return Fconstrain_to_field (make_number (charpos), make_number (PT), | 958 | return Fconstrain_to_field (make_fixnum (charpos), make_fixnum (PT), |
| 959 | XINT (n) != 1 ? Qt : Qnil, | 959 | XFIXNUM (n) != 1 ? Qt : Qnil, |
| 960 | Qt, Qnil); | 960 | Qt, Qnil); |
| 961 | } | 961 | } |
| 962 | 962 | ||
| @@ -985,14 +985,14 @@ This function does not move point. */) | |||
| 985 | if (NILP (n)) | 985 | if (NILP (n)) |
| 986 | XSETFASTINT (n, 1); | 986 | XSETFASTINT (n, 1); |
| 987 | else | 987 | else |
| 988 | CHECK_NUMBER (n); | 988 | CHECK_FIXNUM (n); |
| 989 | 989 | ||
| 990 | clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XINT (n), PTRDIFF_MAX); | 990 | clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XFIXNUM (n), PTRDIFF_MAX); |
| 991 | end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0), | 991 | end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0), |
| 992 | NULL); | 992 | NULL); |
| 993 | 993 | ||
| 994 | /* Return END_POS constrained to the current input field. */ | 994 | /* Return END_POS constrained to the current input field. */ |
| 995 | return Fconstrain_to_field (make_number (end_pos), make_number (orig), | 995 | return Fconstrain_to_field (make_fixnum (end_pos), make_fixnum (orig), |
| 996 | Qnil, Qt, Qnil); | 996 | Qnil, Qt, Qnil); |
| 997 | } | 997 | } |
| 998 | 998 | ||
| @@ -1034,7 +1034,7 @@ save_excursion_restore (Lisp_Object marker, Lisp_Object window) | |||
| 1034 | /* Set window point if WINDOW is live and shows the current buffer. */ | 1034 | /* Set window point if WINDOW is live and shows the current buffer. */ |
| 1035 | Lisp_Object contents = XWINDOW (window)->contents; | 1035 | Lisp_Object contents = XWINDOW (window)->contents; |
| 1036 | if (BUFFERP (contents) && XBUFFER (contents) == current_buffer) | 1036 | if (BUFFERP (contents) && XBUFFER (contents) == current_buffer) |
| 1037 | Fset_window_point (window, make_number (PT)); | 1037 | Fset_window_point (window, make_fixnum (PT)); |
| 1038 | } | 1038 | } |
| 1039 | } | 1039 | } |
| 1040 | 1040 | ||
| @@ -1088,11 +1088,11 @@ in some other BUFFER, use | |||
| 1088 | (Lisp_Object buffer) | 1088 | (Lisp_Object buffer) |
| 1089 | { | 1089 | { |
| 1090 | if (NILP (buffer)) | 1090 | if (NILP (buffer)) |
| 1091 | return make_number (Z - BEG); | 1091 | return make_fixnum (Z - BEG); |
| 1092 | else | 1092 | else |
| 1093 | { | 1093 | { |
| 1094 | CHECK_BUFFER (buffer); | 1094 | CHECK_BUFFER (buffer); |
| 1095 | return make_number (BUF_Z (XBUFFER (buffer)) | 1095 | return make_fixnum (BUF_Z (XBUFFER (buffer)) |
| 1096 | - BUF_BEG (XBUFFER (buffer))); | 1096 | - BUF_BEG (XBUFFER (buffer))); |
| 1097 | } | 1097 | } |
| 1098 | } | 1098 | } |
| @@ -1160,10 +1160,10 @@ DEFUN ("position-bytes", Fposition_bytes, Sposition_bytes, 1, 1, 0, | |||
| 1160 | If POSITION is out of range, the value is nil. */) | 1160 | If POSITION is out of range, the value is nil. */) |
| 1161 | (Lisp_Object position) | 1161 | (Lisp_Object position) |
| 1162 | { | 1162 | { |
| 1163 | CHECK_NUMBER_COERCE_MARKER (position); | 1163 | CHECK_FIXNUM_COERCE_MARKER (position); |
| 1164 | if (XINT (position) < BEG || XINT (position) > Z) | 1164 | if (XFIXNUM (position) < BEG || XFIXNUM (position) > Z) |
| 1165 | return Qnil; | 1165 | return Qnil; |
| 1166 | return make_number (CHAR_TO_BYTE (XINT (position))); | 1166 | return make_fixnum (CHAR_TO_BYTE (XFIXNUM (position))); |
| 1167 | } | 1167 | } |
| 1168 | 1168 | ||
| 1169 | DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0, | 1169 | DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0, |
| @@ -1173,8 +1173,8 @@ If BYTEPOS is out of range, the value is nil. */) | |||
| 1173 | { | 1173 | { |
| 1174 | ptrdiff_t pos_byte; | 1174 | ptrdiff_t pos_byte; |
| 1175 | 1175 | ||
| 1176 | CHECK_NUMBER (bytepos); | 1176 | CHECK_FIXNUM (bytepos); |
| 1177 | pos_byte = XINT (bytepos); | 1177 | pos_byte = XFIXNUM (bytepos); |
| 1178 | if (pos_byte < BEG_BYTE || pos_byte > Z_BYTE) | 1178 | if (pos_byte < BEG_BYTE || pos_byte > Z_BYTE) |
| 1179 | return Qnil; | 1179 | return Qnil; |
| 1180 | if (Z != Z_BYTE) | 1180 | if (Z != Z_BYTE) |
| @@ -1184,7 +1184,7 @@ If BYTEPOS is out of range, the value is nil. */) | |||
| 1184 | character. */ | 1184 | character. */ |
| 1185 | while (!CHAR_HEAD_P (FETCH_BYTE (pos_byte))) | 1185 | while (!CHAR_HEAD_P (FETCH_BYTE (pos_byte))) |
| 1186 | pos_byte--; | 1186 | pos_byte--; |
| 1187 | return make_number (BYTE_TO_CHAR (pos_byte)); | 1187 | return make_fixnum (BYTE_TO_CHAR (pos_byte)); |
| 1188 | } | 1188 | } |
| 1189 | 1189 | ||
| 1190 | DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, | 1190 | DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, |
| @@ -1280,14 +1280,14 @@ If POS is out of range, the value is nil. */) | |||
| 1280 | } | 1280 | } |
| 1281 | else | 1281 | else |
| 1282 | { | 1282 | { |
| 1283 | CHECK_NUMBER_COERCE_MARKER (pos); | 1283 | CHECK_FIXNUM_COERCE_MARKER (pos); |
| 1284 | if (XINT (pos) < BEGV || XINT (pos) >= ZV) | 1284 | if (XFIXNUM (pos) < BEGV || XFIXNUM (pos) >= ZV) |
| 1285 | return Qnil; | 1285 | return Qnil; |
| 1286 | 1286 | ||
| 1287 | pos_byte = CHAR_TO_BYTE (XINT (pos)); | 1287 | pos_byte = CHAR_TO_BYTE (XFIXNUM (pos)); |
| 1288 | } | 1288 | } |
| 1289 | 1289 | ||
| 1290 | return make_number (FETCH_CHAR (pos_byte)); | 1290 | return make_fixnum (FETCH_CHAR (pos_byte)); |
| 1291 | } | 1291 | } |
| 1292 | 1292 | ||
| 1293 | DEFUN ("char-before", Fchar_before, Schar_before, 0, 1, 0, | 1293 | DEFUN ("char-before", Fchar_before, Schar_before, 0, 1, 0, |
| @@ -1314,12 +1314,12 @@ If POS is out of range, the value is nil. */) | |||
| 1314 | } | 1314 | } |
| 1315 | else | 1315 | else |
| 1316 | { | 1316 | { |
| 1317 | CHECK_NUMBER_COERCE_MARKER (pos); | 1317 | CHECK_FIXNUM_COERCE_MARKER (pos); |
| 1318 | 1318 | ||
| 1319 | if (XINT (pos) <= BEGV || XINT (pos) > ZV) | 1319 | if (XFIXNUM (pos) <= BEGV || XFIXNUM (pos) > ZV) |
| 1320 | return Qnil; | 1320 | return Qnil; |
| 1321 | 1321 | ||
| 1322 | pos_byte = CHAR_TO_BYTE (XINT (pos)); | 1322 | pos_byte = CHAR_TO_BYTE (XFIXNUM (pos)); |
| 1323 | } | 1323 | } |
| 1324 | 1324 | ||
| 1325 | if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) | 1325 | if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) |
| @@ -1432,7 +1432,7 @@ name, or nil if there is no such user. */) | |||
| 1432 | 1432 | ||
| 1433 | if (NILP (uid)) | 1433 | if (NILP (uid)) |
| 1434 | return Vuser_full_name; | 1434 | return Vuser_full_name; |
| 1435 | else if (NUMBERP (uid)) | 1435 | else if (FIXED_OR_FLOATP (uid)) |
| 1436 | { | 1436 | { |
| 1437 | uid_t u; | 1437 | uid_t u; |
| 1438 | CONS_TO_INTEGER (uid, uid_t, u); | 1438 | CONS_TO_INTEGER (uid, uid_t, u); |
| @@ -1463,7 +1463,7 @@ name, or nil if there is no such user. */) | |||
| 1463 | /* Substitute the login name for the &, upcasing the first character. */ | 1463 | /* Substitute the login name for the &, upcasing the first character. */ |
| 1464 | if (q) | 1464 | if (q) |
| 1465 | { | 1465 | { |
| 1466 | Lisp_Object login = Fuser_login_name (make_number (pw->pw_uid)); | 1466 | Lisp_Object login = Fuser_login_name (make_fixnum (pw->pw_uid)); |
| 1467 | USE_SAFE_ALLOCA; | 1467 | USE_SAFE_ALLOCA; |
| 1468 | char *r = SAFE_ALLOCA (strlen (p) + SBYTES (login) + 1); | 1468 | char *r = SAFE_ALLOCA (strlen (p) + SBYTES (login) + 1); |
| 1469 | memcpy (r, p, q - p); | 1469 | memcpy (r, p, q - p); |
| @@ -1605,14 +1605,14 @@ time_arith (Lisp_Object a, Lisp_Object b, | |||
| 1605 | switch (max (alen, blen)) | 1605 | switch (max (alen, blen)) |
| 1606 | { | 1606 | { |
| 1607 | default: | 1607 | default: |
| 1608 | val = Fcons (make_number (t.ps), val); | 1608 | val = Fcons (make_fixnum (t.ps), val); |
| 1609 | FALLTHROUGH; | 1609 | FALLTHROUGH; |
| 1610 | case 3: | 1610 | case 3: |
| 1611 | val = Fcons (make_number (t.us), val); | 1611 | val = Fcons (make_fixnum (t.us), val); |
| 1612 | FALLTHROUGH; | 1612 | FALLTHROUGH; |
| 1613 | case 2: | 1613 | case 2: |
| 1614 | val = Fcons (make_number (t.lo), val); | 1614 | val = Fcons (make_fixnum (t.lo), val); |
| 1615 | val = Fcons (make_number (t.hi), val); | 1615 | val = Fcons (make_fixnum (t.hi), val); |
| 1616 | break; | 1616 | break; |
| 1617 | } | 1617 | } |
| 1618 | 1618 | ||
| @@ -1714,10 +1714,10 @@ disassemble_lisp_time (Lisp_Object specified_time, Lisp_Object *phigh, | |||
| 1714 | Lisp_Object *plow, Lisp_Object *pusec, | 1714 | Lisp_Object *plow, Lisp_Object *pusec, |
| 1715 | Lisp_Object *ppsec) | 1715 | Lisp_Object *ppsec) |
| 1716 | { | 1716 | { |
| 1717 | Lisp_Object high = make_number (0); | 1717 | Lisp_Object high = make_fixnum (0); |
| 1718 | Lisp_Object low = specified_time; | 1718 | Lisp_Object low = specified_time; |
| 1719 | Lisp_Object usec = make_number (0); | 1719 | Lisp_Object usec = make_fixnum (0); |
| 1720 | Lisp_Object psec = make_number (0); | 1720 | Lisp_Object psec = make_fixnum (0); |
| 1721 | int len = 4; | 1721 | int len = 4; |
| 1722 | 1722 | ||
| 1723 | if (CONSP (specified_time)) | 1723 | if (CONSP (specified_time)) |
| @@ -1750,10 +1750,10 @@ disassemble_lisp_time (Lisp_Object specified_time, Lisp_Object *phigh, | |||
| 1750 | 1750 | ||
| 1751 | /* When combining components, require LOW to be an integer, | 1751 | /* When combining components, require LOW to be an integer, |
| 1752 | as otherwise it would be a pain to add up times. */ | 1752 | as otherwise it would be a pain to add up times. */ |
| 1753 | if (! INTEGERP (low)) | 1753 | if (! FIXNUMP (low)) |
| 1754 | return 0; | 1754 | return 0; |
| 1755 | } | 1755 | } |
| 1756 | else if (INTEGERP (specified_time)) | 1756 | else if (FIXNUMP (specified_time)) |
| 1757 | len = 2; | 1757 | len = 2; |
| 1758 | 1758 | ||
| 1759 | *phigh = high; | 1759 | *phigh = high; |
| @@ -1815,10 +1815,10 @@ decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec, | |||
| 1815 | struct lisp_time *result, double *dresult) | 1815 | struct lisp_time *result, double *dresult) |
| 1816 | { | 1816 | { |
| 1817 | EMACS_INT hi, lo, us, ps; | 1817 | EMACS_INT hi, lo, us, ps; |
| 1818 | if (! (INTEGERP (high) | 1818 | if (! (FIXNUMP (high) |
| 1819 | && INTEGERP (usec) && INTEGERP (psec))) | 1819 | && FIXNUMP (usec) && FIXNUMP (psec))) |
| 1820 | return 0; | 1820 | return 0; |
| 1821 | if (! INTEGERP (low)) | 1821 | if (! FIXNUMP (low)) |
| 1822 | { | 1822 | { |
| 1823 | if (FLOATP (low)) | 1823 | if (FLOATP (low)) |
| 1824 | { | 1824 | { |
| @@ -1847,10 +1847,10 @@ decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec, | |||
| 1847 | return 0; | 1847 | return 0; |
| 1848 | } | 1848 | } |
| 1849 | 1849 | ||
| 1850 | hi = XINT (high); | 1850 | hi = XFIXNUM (high); |
| 1851 | lo = XINT (low); | 1851 | lo = XFIXNUM (low); |
| 1852 | us = XINT (usec); | 1852 | us = XFIXNUM (usec); |
| 1853 | ps = XINT (psec); | 1853 | ps = XFIXNUM (psec); |
| 1854 | 1854 | ||
| 1855 | /* Normalize out-of-range lower-order components by carrying | 1855 | /* Normalize out-of-range lower-order components by carrying |
| 1856 | each overflow into the next higher-order component. */ | 1856 | each overflow into the next higher-order component. */ |
| @@ -1933,8 +1933,8 @@ lisp_seconds_argument (Lisp_Object specified_time) | |||
| 1933 | int val = disassemble_lisp_time (specified_time, &high, &low, &usec, &psec); | 1933 | int val = disassemble_lisp_time (specified_time, &high, &low, &usec, &psec); |
| 1934 | if (val != 0) | 1934 | if (val != 0) |
| 1935 | { | 1935 | { |
| 1936 | val = decode_time_components (high, low, make_number (0), | 1936 | val = decode_time_components (high, low, make_fixnum (0), |
| 1937 | make_number (0), &t, 0); | 1937 | make_fixnum (0), &t, 0); |
| 1938 | if (0 < val | 1938 | if (0 < val |
| 1939 | && ! ((TYPE_SIGNED (time_t) | 1939 | && ! ((TYPE_SIGNED (time_t) |
| 1940 | ? TIME_T_MIN >> LO_TIME_BITS <= t.hi | 1940 | ? TIME_T_MIN >> LO_TIME_BITS <= t.hi |
| @@ -2186,18 +2186,18 @@ usage: (decode-time &optional TIME ZONE) */) | |||
| 2186 | EMACS_INT tm_year_base = TM_YEAR_BASE; | 2186 | EMACS_INT tm_year_base = TM_YEAR_BASE; |
| 2187 | 2187 | ||
| 2188 | return CALLN (Flist, | 2188 | return CALLN (Flist, |
| 2189 | make_number (local_tm.tm_sec), | 2189 | make_fixnum (local_tm.tm_sec), |
| 2190 | make_number (local_tm.tm_min), | 2190 | make_fixnum (local_tm.tm_min), |
| 2191 | make_number (local_tm.tm_hour), | 2191 | make_fixnum (local_tm.tm_hour), |
| 2192 | make_number (local_tm.tm_mday), | 2192 | make_fixnum (local_tm.tm_mday), |
| 2193 | make_number (local_tm.tm_mon + 1), | 2193 | make_fixnum (local_tm.tm_mon + 1), |
| 2194 | make_number (local_tm.tm_year + tm_year_base), | 2194 | make_fixnum (local_tm.tm_year + tm_year_base), |
| 2195 | make_number (local_tm.tm_wday), | 2195 | make_fixnum (local_tm.tm_wday), |
| 2196 | local_tm.tm_isdst ? Qt : Qnil, | 2196 | local_tm.tm_isdst ? Qt : Qnil, |
| 2197 | (HAVE_TM_GMTOFF | 2197 | (HAVE_TM_GMTOFF |
| 2198 | ? make_number (tm_gmtoff (&local_tm)) | 2198 | ? make_fixnum (tm_gmtoff (&local_tm)) |
| 2199 | : gmtime_r (&time_spec, &gmt_tm) | 2199 | : gmtime_r (&time_spec, &gmt_tm) |
| 2200 | ? make_number (tm_diff (&local_tm, &gmt_tm)) | 2200 | ? make_fixnum (tm_diff (&local_tm, &gmt_tm)) |
| 2201 | : Qnil)); | 2201 | : Qnil)); |
| 2202 | } | 2202 | } |
| 2203 | 2203 | ||
| @@ -2206,8 +2206,8 @@ usage: (decode-time &optional TIME ZONE) */) | |||
| 2206 | static int | 2206 | static int |
| 2207 | check_tm_member (Lisp_Object obj, int offset) | 2207 | check_tm_member (Lisp_Object obj, int offset) |
| 2208 | { | 2208 | { |
| 2209 | CHECK_NUMBER (obj); | 2209 | CHECK_FIXNUM (obj); |
| 2210 | EMACS_INT n = XINT (obj); | 2210 | EMACS_INT n = XFIXNUM (obj); |
| 2211 | int result; | 2211 | int result; |
| 2212 | if (INT_SUBTRACT_WRAPV (n, offset, &result)) | 2212 | if (INT_SUBTRACT_WRAPV (n, offset, &result)) |
| 2213 | time_overflow (); | 2213 | time_overflow (); |
| @@ -2389,7 +2389,7 @@ the data it can't find. */) | |||
| 2389 | long int offset = (HAVE_TM_GMTOFF | 2389 | long int offset = (HAVE_TM_GMTOFF |
| 2390 | ? tm_gmtoff (&local_tm) | 2390 | ? tm_gmtoff (&local_tm) |
| 2391 | : tm_diff (&local_tm, &gmt_tm)); | 2391 | : tm_diff (&local_tm, &gmt_tm)); |
| 2392 | zone_offset = make_number (offset); | 2392 | zone_offset = make_fixnum (offset); |
| 2393 | if (SCHARS (zone_name) == 0) | 2393 | if (SCHARS (zone_name) == 0) |
| 2394 | { | 2394 | { |
| 2395 | /* No local time zone name is available; use numeric zone instead. */ | 2395 | /* No local time zone name is available; use numeric zone instead. */ |
| @@ -2532,7 +2532,7 @@ general_insert_function (void (*insert_func) | |||
| 2532 | val = args[argnum]; | 2532 | val = args[argnum]; |
| 2533 | if (CHARACTERP (val)) | 2533 | if (CHARACTERP (val)) |
| 2534 | { | 2534 | { |
| 2535 | int c = XFASTINT (val); | 2535 | int c = XFIXNAT (val); |
| 2536 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | 2536 | unsigned char str[MAX_MULTIBYTE_LENGTH]; |
| 2537 | int len; | 2537 | int len; |
| 2538 | 2538 | ||
| @@ -2688,18 +2688,18 @@ called interactively, INHERIT is t. */) | |||
| 2688 | CHECK_CHARACTER (character); | 2688 | CHECK_CHARACTER (character); |
| 2689 | if (NILP (count)) | 2689 | if (NILP (count)) |
| 2690 | XSETFASTINT (count, 1); | 2690 | XSETFASTINT (count, 1); |
| 2691 | CHECK_NUMBER (count); | 2691 | CHECK_FIXNUM (count); |
| 2692 | c = XFASTINT (character); | 2692 | c = XFIXNAT (character); |
| 2693 | 2693 | ||
| 2694 | if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) | 2694 | if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) |
| 2695 | len = CHAR_STRING (c, str); | 2695 | len = CHAR_STRING (c, str); |
| 2696 | else | 2696 | else |
| 2697 | str[0] = c, len = 1; | 2697 | str[0] = c, len = 1; |
| 2698 | if (XINT (count) <= 0) | 2698 | if (XFIXNUM (count) <= 0) |
| 2699 | return Qnil; | 2699 | return Qnil; |
| 2700 | if (BUF_BYTES_MAX / len < XINT (count)) | 2700 | if (BUF_BYTES_MAX / len < XFIXNUM (count)) |
| 2701 | buffer_overflow (); | 2701 | buffer_overflow (); |
| 2702 | n = XINT (count) * len; | 2702 | n = XFIXNUM (count) * len; |
| 2703 | stringlen = min (n, sizeof string - sizeof string % len); | 2703 | stringlen = min (n, sizeof string - sizeof string % len); |
| 2704 | for (i = 0; i < stringlen; i++) | 2704 | for (i = 0; i < stringlen; i++) |
| 2705 | string[i] = str[i % len]; | 2705 | string[i] = str[i % len]; |
| @@ -2732,12 +2732,12 @@ The optional third arg INHERIT, if non-nil, says to inherit text properties | |||
| 2732 | from adjoining text, if those properties are sticky. */) | 2732 | from adjoining text, if those properties are sticky. */) |
| 2733 | (Lisp_Object byte, Lisp_Object count, Lisp_Object inherit) | 2733 | (Lisp_Object byte, Lisp_Object count, Lisp_Object inherit) |
| 2734 | { | 2734 | { |
| 2735 | CHECK_NUMBER (byte); | 2735 | CHECK_FIXNUM (byte); |
| 2736 | if (XINT (byte) < 0 || XINT (byte) > 255) | 2736 | if (XFIXNUM (byte) < 0 || XFIXNUM (byte) > 255) |
| 2737 | args_out_of_range_3 (byte, make_number (0), make_number (255)); | 2737 | args_out_of_range_3 (byte, make_fixnum (0), make_fixnum (255)); |
| 2738 | if (XINT (byte) >= 128 | 2738 | if (XFIXNUM (byte) >= 128 |
| 2739 | && ! NILP (BVAR (current_buffer, enable_multibyte_characters))) | 2739 | && ! NILP (BVAR (current_buffer, enable_multibyte_characters))) |
| 2740 | XSETFASTINT (byte, BYTE8_TO_CHAR (XINT (byte))); | 2740 | XSETFASTINT (byte, BYTE8_TO_CHAR (XFIXNUM (byte))); |
| 2741 | return Finsert_char (byte, count, inherit); | 2741 | return Finsert_char (byte, count, inherit); |
| 2742 | } | 2742 | } |
| 2743 | 2743 | ||
| @@ -2820,10 +2820,10 @@ make_buffer_string_both (ptrdiff_t start, ptrdiff_t start_byte, | |||
| 2820 | { | 2820 | { |
| 2821 | update_buffer_properties (start, end); | 2821 | update_buffer_properties (start, end); |
| 2822 | 2822 | ||
| 2823 | tem = Fnext_property_change (make_number (start), Qnil, make_number (end)); | 2823 | tem = Fnext_property_change (make_fixnum (start), Qnil, make_fixnum (end)); |
| 2824 | tem1 = Ftext_properties_at (make_number (start), Qnil); | 2824 | tem1 = Ftext_properties_at (make_fixnum (start), Qnil); |
| 2825 | 2825 | ||
| 2826 | if (XINT (tem) != end || !NILP (tem1)) | 2826 | if (XFIXNUM (tem) != end || !NILP (tem1)) |
| 2827 | copy_intervals_to_string (result, current_buffer, start, | 2827 | copy_intervals_to_string (result, current_buffer, start, |
| 2828 | end - start); | 2828 | end - start); |
| 2829 | } | 2829 | } |
| @@ -2846,7 +2846,7 @@ update_buffer_properties (ptrdiff_t start, ptrdiff_t end) | |||
| 2846 | if (!NILP (Vbuffer_access_fontified_property)) | 2846 | if (!NILP (Vbuffer_access_fontified_property)) |
| 2847 | { | 2847 | { |
| 2848 | Lisp_Object tem | 2848 | Lisp_Object tem |
| 2849 | = Ftext_property_any (make_number (start), make_number (end), | 2849 | = Ftext_property_any (make_fixnum (start), make_fixnum (end), |
| 2850 | Vbuffer_access_fontified_property, | 2850 | Vbuffer_access_fontified_property, |
| 2851 | Qnil, Qnil); | 2851 | Qnil, Qnil); |
| 2852 | if (NILP (tem)) | 2852 | if (NILP (tem)) |
| @@ -2854,7 +2854,7 @@ update_buffer_properties (ptrdiff_t start, ptrdiff_t end) | |||
| 2854 | } | 2854 | } |
| 2855 | 2855 | ||
| 2856 | CALLN (Frun_hook_with_args, Qbuffer_access_fontify_functions, | 2856 | CALLN (Frun_hook_with_args, Qbuffer_access_fontify_functions, |
| 2857 | make_number (start), make_number (end)); | 2857 | make_fixnum (start), make_fixnum (end)); |
| 2858 | } | 2858 | } |
| 2859 | } | 2859 | } |
| 2860 | 2860 | ||
| @@ -2872,8 +2872,8 @@ use `buffer-substring-no-properties' instead. */) | |||
| 2872 | register ptrdiff_t b, e; | 2872 | register ptrdiff_t b, e; |
| 2873 | 2873 | ||
| 2874 | validate_region (&start, &end); | 2874 | validate_region (&start, &end); |
| 2875 | b = XINT (start); | 2875 | b = XFIXNUM (start); |
| 2876 | e = XINT (end); | 2876 | e = XFIXNUM (end); |
| 2877 | 2877 | ||
| 2878 | return make_buffer_string (b, e, 1); | 2878 | return make_buffer_string (b, e, 1); |
| 2879 | } | 2879 | } |
| @@ -2888,8 +2888,8 @@ they can be in either order. */) | |||
| 2888 | register ptrdiff_t b, e; | 2888 | register ptrdiff_t b, e; |
| 2889 | 2889 | ||
| 2890 | validate_region (&start, &end); | 2890 | validate_region (&start, &end); |
| 2891 | b = XINT (start); | 2891 | b = XFIXNUM (start); |
| 2892 | e = XINT (end); | 2892 | e = XFIXNUM (end); |
| 2893 | 2893 | ||
| 2894 | return make_buffer_string (b, e, 0); | 2894 | return make_buffer_string (b, e, 0); |
| 2895 | } | 2895 | } |
| @@ -2934,15 +2934,15 @@ using `string-make-multibyte' or `string-make-unibyte', which see. */) | |||
| 2934 | b = BUF_BEGV (bp); | 2934 | b = BUF_BEGV (bp); |
| 2935 | else | 2935 | else |
| 2936 | { | 2936 | { |
| 2937 | CHECK_NUMBER_COERCE_MARKER (start); | 2937 | CHECK_FIXNUM_COERCE_MARKER (start); |
| 2938 | b = XINT (start); | 2938 | b = XFIXNUM (start); |
| 2939 | } | 2939 | } |
| 2940 | if (NILP (end)) | 2940 | if (NILP (end)) |
| 2941 | e = BUF_ZV (bp); | 2941 | e = BUF_ZV (bp); |
| 2942 | else | 2942 | else |
| 2943 | { | 2943 | { |
| 2944 | CHECK_NUMBER_COERCE_MARKER (end); | 2944 | CHECK_FIXNUM_COERCE_MARKER (end); |
| 2945 | e = XINT (end); | 2945 | e = XFIXNUM (end); |
| 2946 | } | 2946 | } |
| 2947 | 2947 | ||
| 2948 | if (b > e) | 2948 | if (b > e) |
| @@ -3002,15 +3002,15 @@ determines whether case is significant or ignored. */) | |||
| 3002 | begp1 = BUF_BEGV (bp1); | 3002 | begp1 = BUF_BEGV (bp1); |
| 3003 | else | 3003 | else |
| 3004 | { | 3004 | { |
| 3005 | CHECK_NUMBER_COERCE_MARKER (start1); | 3005 | CHECK_FIXNUM_COERCE_MARKER (start1); |
| 3006 | begp1 = XINT (start1); | 3006 | begp1 = XFIXNUM (start1); |
| 3007 | } | 3007 | } |
| 3008 | if (NILP (end1)) | 3008 | if (NILP (end1)) |
| 3009 | endp1 = BUF_ZV (bp1); | 3009 | endp1 = BUF_ZV (bp1); |
| 3010 | else | 3010 | else |
| 3011 | { | 3011 | { |
| 3012 | CHECK_NUMBER_COERCE_MARKER (end1); | 3012 | CHECK_FIXNUM_COERCE_MARKER (end1); |
| 3013 | endp1 = XINT (end1); | 3013 | endp1 = XFIXNUM (end1); |
| 3014 | } | 3014 | } |
| 3015 | 3015 | ||
| 3016 | if (begp1 > endp1) | 3016 | if (begp1 > endp1) |
| @@ -3040,15 +3040,15 @@ determines whether case is significant or ignored. */) | |||
| 3040 | begp2 = BUF_BEGV (bp2); | 3040 | begp2 = BUF_BEGV (bp2); |
| 3041 | else | 3041 | else |
| 3042 | { | 3042 | { |
| 3043 | CHECK_NUMBER_COERCE_MARKER (start2); | 3043 | CHECK_FIXNUM_COERCE_MARKER (start2); |
| 3044 | begp2 = XINT (start2); | 3044 | begp2 = XFIXNUM (start2); |
| 3045 | } | 3045 | } |
| 3046 | if (NILP (end2)) | 3046 | if (NILP (end2)) |
| 3047 | endp2 = BUF_ZV (bp2); | 3047 | endp2 = BUF_ZV (bp2); |
| 3048 | else | 3048 | else |
| 3049 | { | 3049 | { |
| 3050 | CHECK_NUMBER_COERCE_MARKER (end2); | 3050 | CHECK_FIXNUM_COERCE_MARKER (end2); |
| 3051 | endp2 = XINT (end2); | 3051 | endp2 = XFIXNUM (end2); |
| 3052 | } | 3052 | } |
| 3053 | 3053 | ||
| 3054 | if (begp2 > endp2) | 3054 | if (begp2 > endp2) |
| @@ -3103,7 +3103,7 @@ determines whether case is significant or ignored. */) | |||
| 3103 | } | 3103 | } |
| 3104 | 3104 | ||
| 3105 | if (c1 != c2) | 3105 | if (c1 != c2) |
| 3106 | return make_number (c1 < c2 ? -1 - chars : chars + 1); | 3106 | return make_fixnum (c1 < c2 ? -1 - chars : chars + 1); |
| 3107 | 3107 | ||
| 3108 | chars++; | 3108 | chars++; |
| 3109 | rarely_quit (chars); | 3109 | rarely_quit (chars); |
| @@ -3112,12 +3112,12 @@ determines whether case is significant or ignored. */) | |||
| 3112 | /* The strings match as far as they go. | 3112 | /* The strings match as far as they go. |
| 3113 | If one is shorter, that one is less. */ | 3113 | If one is shorter, that one is less. */ |
| 3114 | if (chars < endp1 - begp1) | 3114 | if (chars < endp1 - begp1) |
| 3115 | return make_number (chars + 1); | 3115 | return make_fixnum (chars + 1); |
| 3116 | else if (chars < endp2 - begp2) | 3116 | else if (chars < endp2 - begp2) |
| 3117 | return make_number (- chars - 1); | 3117 | return make_fixnum (- chars - 1); |
| 3118 | 3118 | ||
| 3119 | /* Same length too => they are equal. */ | 3119 | /* Same length too => they are equal. */ |
| 3120 | return make_number (0); | 3120 | return make_fixnum (0); |
| 3121 | } | 3121 | } |
| 3122 | 3122 | ||
| 3123 | 3123 | ||
| @@ -3298,8 +3298,8 @@ differences between the two buffers. */) | |||
| 3298 | if (beg_b < end_b) | 3298 | if (beg_b < end_b) |
| 3299 | { | 3299 | { |
| 3300 | SET_PT (beg_a); | 3300 | SET_PT (beg_a); |
| 3301 | Finsert_buffer_substring (source, make_natnum (beg_b), | 3301 | Finsert_buffer_substring (source, make_fixed_natnum (beg_b), |
| 3302 | make_natnum (end_b)); | 3302 | make_fixed_natnum (end_b)); |
| 3303 | } | 3303 | } |
| 3304 | } | 3304 | } |
| 3305 | --i; | 3305 | --i; |
| @@ -3426,8 +3426,8 @@ Both characters must have the same length of multi-byte form. */) | |||
| 3426 | validate_region (&start, &end); | 3426 | validate_region (&start, &end); |
| 3427 | CHECK_CHARACTER (fromchar); | 3427 | CHECK_CHARACTER (fromchar); |
| 3428 | CHECK_CHARACTER (tochar); | 3428 | CHECK_CHARACTER (tochar); |
| 3429 | fromc = XFASTINT (fromchar); | 3429 | fromc = XFIXNAT (fromchar); |
| 3430 | toc = XFASTINT (tochar); | 3430 | toc = XFIXNAT (tochar); |
| 3431 | 3431 | ||
| 3432 | if (multibyte_p) | 3432 | if (multibyte_p) |
| 3433 | { | 3433 | { |
| @@ -3453,9 +3453,9 @@ Both characters must have the same length of multi-byte form. */) | |||
| 3453 | tostr[0] = toc; | 3453 | tostr[0] = toc; |
| 3454 | } | 3454 | } |
| 3455 | 3455 | ||
| 3456 | pos = XINT (start); | 3456 | pos = XFIXNUM (start); |
| 3457 | pos_byte = CHAR_TO_BYTE (pos); | 3457 | pos_byte = CHAR_TO_BYTE (pos); |
| 3458 | stop = CHAR_TO_BYTE (XINT (end)); | 3458 | stop = CHAR_TO_BYTE (XFIXNUM (end)); |
| 3459 | end_byte = stop; | 3459 | end_byte = stop; |
| 3460 | 3460 | ||
| 3461 | /* If we don't want undo, turn off putting stuff on the list. | 3461 | /* If we don't want undo, turn off putting stuff on the list. |
| @@ -3503,7 +3503,7 @@ Both characters must have the same length of multi-byte form. */) | |||
| 3503 | else if (!changed) | 3503 | else if (!changed) |
| 3504 | { | 3504 | { |
| 3505 | changed = -1; | 3505 | changed = -1; |
| 3506 | modify_text (pos, XINT (end)); | 3506 | modify_text (pos, XFIXNUM (end)); |
| 3507 | 3507 | ||
| 3508 | if (! NILP (noundo)) | 3508 | if (! NILP (noundo)) |
| 3509 | { | 3509 | { |
| @@ -3626,7 +3626,7 @@ check_translation (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t end, | |||
| 3626 | buf[buf_used++] = STRING_CHAR_AND_LENGTH (p, len1); | 3626 | buf[buf_used++] = STRING_CHAR_AND_LENGTH (p, len1); |
| 3627 | pos_byte += len1; | 3627 | pos_byte += len1; |
| 3628 | } | 3628 | } |
| 3629 | if (XINT (AREF (elt, i)) != buf[i]) | 3629 | if (XFIXNUM (AREF (elt, i)) != buf[i]) |
| 3630 | break; | 3630 | break; |
| 3631 | } | 3631 | } |
| 3632 | if (i == len) | 3632 | if (i == len) |
| @@ -3678,9 +3678,9 @@ It returns the number of characters changed. */) | |||
| 3678 | tt = SDATA (table); | 3678 | tt = SDATA (table); |
| 3679 | } | 3679 | } |
| 3680 | 3680 | ||
| 3681 | pos = XINT (start); | 3681 | pos = XFIXNUM (start); |
| 3682 | pos_byte = CHAR_TO_BYTE (pos); | 3682 | pos_byte = CHAR_TO_BYTE (pos); |
| 3683 | end_pos = XINT (end); | 3683 | end_pos = XFIXNUM (end); |
| 3684 | modify_text (pos, end_pos); | 3684 | modify_text (pos, end_pos); |
| 3685 | 3685 | ||
| 3686 | cnt = 0; | 3686 | cnt = 0; |
| @@ -3729,7 +3729,7 @@ It returns the number of characters changed. */) | |||
| 3729 | val = CHAR_TABLE_REF (table, oc); | 3729 | val = CHAR_TABLE_REF (table, oc); |
| 3730 | if (CHARACTERP (val)) | 3730 | if (CHARACTERP (val)) |
| 3731 | { | 3731 | { |
| 3732 | nc = XFASTINT (val); | 3732 | nc = XFIXNAT (val); |
| 3733 | str_len = CHAR_STRING (nc, buf); | 3733 | str_len = CHAR_STRING (nc, buf); |
| 3734 | str = buf; | 3734 | str = buf; |
| 3735 | } | 3735 | } |
| @@ -3790,7 +3790,7 @@ It returns the number of characters changed. */) | |||
| 3790 | } | 3790 | } |
| 3791 | else | 3791 | else |
| 3792 | { | 3792 | { |
| 3793 | string = Fmake_string (make_number (1), val, Qnil); | 3793 | string = Fmake_string (make_fixnum (1), val, Qnil); |
| 3794 | } | 3794 | } |
| 3795 | replace_range (pos, pos + len, string, 1, 0, 1, 0); | 3795 | replace_range (pos, pos + len, string, 1, 0, 1, 0); |
| 3796 | pos_byte += SBYTES (string); | 3796 | pos_byte += SBYTES (string); |
| @@ -3804,7 +3804,7 @@ It returns the number of characters changed. */) | |||
| 3804 | pos++; | 3804 | pos++; |
| 3805 | } | 3805 | } |
| 3806 | 3806 | ||
| 3807 | return make_number (cnt); | 3807 | return make_fixnum (cnt); |
| 3808 | } | 3808 | } |
| 3809 | 3809 | ||
| 3810 | DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", | 3810 | DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", |
| @@ -3814,7 +3814,7 @@ This command deletes buffer text without modifying the kill ring. */) | |||
| 3814 | (Lisp_Object start, Lisp_Object end) | 3814 | (Lisp_Object start, Lisp_Object end) |
| 3815 | { | 3815 | { |
| 3816 | validate_region (&start, &end); | 3816 | validate_region (&start, &end); |
| 3817 | del_range (XINT (start), XINT (end)); | 3817 | del_range (XFIXNUM (start), XFIXNUM (end)); |
| 3818 | return Qnil; | 3818 | return Qnil; |
| 3819 | } | 3819 | } |
| 3820 | 3820 | ||
| @@ -3824,9 +3824,9 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, | |||
| 3824 | (Lisp_Object start, Lisp_Object end) | 3824 | (Lisp_Object start, Lisp_Object end) |
| 3825 | { | 3825 | { |
| 3826 | validate_region (&start, &end); | 3826 | validate_region (&start, &end); |
| 3827 | if (XINT (start) == XINT (end)) | 3827 | if (XFIXNUM (start) == XFIXNUM (end)) |
| 3828 | return empty_unibyte_string; | 3828 | return empty_unibyte_string; |
| 3829 | return del_range_1 (XINT (start), XINT (end), 1, 1); | 3829 | return del_range_1 (XFIXNUM (start), XFIXNUM (end), 1, 1); |
| 3830 | } | 3830 | } |
| 3831 | 3831 | ||
| 3832 | DEFUN ("widen", Fwiden, Swiden, 0, 0, "", | 3832 | DEFUN ("widen", Fwiden, Swiden, 0, 0, "", |
| @@ -3855,27 +3855,27 @@ When calling from a program, pass two arguments; positions (integers | |||
| 3855 | or markers) bounding the text that should remain visible. */) | 3855 | or markers) bounding the text that should remain visible. */) |
| 3856 | (register Lisp_Object start, Lisp_Object end) | 3856 | (register Lisp_Object start, Lisp_Object end) |
| 3857 | { | 3857 | { |
| 3858 | CHECK_NUMBER_COERCE_MARKER (start); | 3858 | CHECK_FIXNUM_COERCE_MARKER (start); |
| 3859 | CHECK_NUMBER_COERCE_MARKER (end); | 3859 | CHECK_FIXNUM_COERCE_MARKER (end); |
| 3860 | 3860 | ||
| 3861 | if (XINT (start) > XINT (end)) | 3861 | if (XFIXNUM (start) > XFIXNUM (end)) |
| 3862 | { | 3862 | { |
| 3863 | Lisp_Object tem; | 3863 | Lisp_Object tem; |
| 3864 | tem = start; start = end; end = tem; | 3864 | tem = start; start = end; end = tem; |
| 3865 | } | 3865 | } |
| 3866 | 3866 | ||
| 3867 | if (!(BEG <= XINT (start) && XINT (start) <= XINT (end) && XINT (end) <= Z)) | 3867 | if (!(BEG <= XFIXNUM (start) && XFIXNUM (start) <= XFIXNUM (end) && XFIXNUM (end) <= Z)) |
| 3868 | args_out_of_range (start, end); | 3868 | args_out_of_range (start, end); |
| 3869 | 3869 | ||
| 3870 | if (BEGV != XFASTINT (start) || ZV != XFASTINT (end)) | 3870 | if (BEGV != XFIXNAT (start) || ZV != XFIXNAT (end)) |
| 3871 | current_buffer->clip_changed = 1; | 3871 | current_buffer->clip_changed = 1; |
| 3872 | 3872 | ||
| 3873 | SET_BUF_BEGV (current_buffer, XFASTINT (start)); | 3873 | SET_BUF_BEGV (current_buffer, XFIXNAT (start)); |
| 3874 | SET_BUF_ZV (current_buffer, XFASTINT (end)); | 3874 | SET_BUF_ZV (current_buffer, XFIXNAT (end)); |
| 3875 | if (PT < XFASTINT (start)) | 3875 | if (PT < XFIXNAT (start)) |
| 3876 | SET_PT (XFASTINT (start)); | 3876 | SET_PT (XFIXNAT (start)); |
| 3877 | if (PT > XFASTINT (end)) | 3877 | if (PT > XFIXNAT (end)) |
| 3878 | SET_PT (XFASTINT (end)); | 3878 | SET_PT (XFIXNAT (end)); |
| 3879 | /* Changing the buffer bounds invalidates any recorded current column. */ | 3879 | /* Changing the buffer bounds invalidates any recorded current column. */ |
| 3880 | invalidate_current_column (); | 3880 | invalidate_current_column (); |
| 3881 | return Qnil; | 3881 | return Qnil; |
| @@ -4121,8 +4121,8 @@ usage: (propertize STRING &rest PROPERTIES) */) | |||
| 4121 | for (i = 1; i < nargs; i += 2) | 4121 | for (i = 1; i < nargs; i += 2) |
| 4122 | properties = Fcons (args[i], Fcons (args[i + 1], properties)); | 4122 | properties = Fcons (args[i], Fcons (args[i + 1], properties)); |
| 4123 | 4123 | ||
| 4124 | Fadd_text_properties (make_number (0), | 4124 | Fadd_text_properties (make_fixnum (0), |
| 4125 | make_number (SCHARS (string)), | 4125 | make_fixnum (SCHARS (string)), |
| 4126 | properties, string); | 4126 | properties, string); |
| 4127 | return string; | 4127 | return string; |
| 4128 | } | 4128 | } |
| @@ -4466,7 +4466,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4466 | } | 4466 | } |
| 4467 | else if (conversion == 'c') | 4467 | else if (conversion == 'c') |
| 4468 | { | 4468 | { |
| 4469 | if (INTEGERP (arg) && ! ASCII_CHAR_P (XINT (arg))) | 4469 | if (FIXNUMP (arg) && ! ASCII_CHAR_P (XFIXNUM (arg))) |
| 4470 | { | 4470 | { |
| 4471 | if (!multibyte) | 4471 | if (!multibyte) |
| 4472 | { | 4472 | { |
| @@ -4480,6 +4480,25 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4480 | conversion = 's'; | 4480 | conversion = 's'; |
| 4481 | zero_flag = false; | 4481 | zero_flag = false; |
| 4482 | } | 4482 | } |
| 4483 | else if ((conversion == 'd' || conversion == 'i' | ||
| 4484 | || conversion == 'o' || conversion == 'x' | ||
| 4485 | || conversion == 'X') | ||
| 4486 | && BIGNUMP (arg)) | ||
| 4487 | { | ||
| 4488 | int base = 10; | ||
| 4489 | |||
| 4490 | if (conversion == 'o') | ||
| 4491 | base = 8; | ||
| 4492 | else if (conversion == 'x') | ||
| 4493 | base = 16; | ||
| 4494 | else if (conversion == 'X') | ||
| 4495 | base = -16; | ||
| 4496 | |||
| 4497 | char *str = mpz_get_str (NULL, base, XBIGNUM (arg)->value); | ||
| 4498 | arg = make_unibyte_string (str, strlen (str)); | ||
| 4499 | xfree (str); | ||
| 4500 | conversion = 's'; | ||
| 4501 | } | ||
| 4483 | 4502 | ||
| 4484 | if (SYMBOLP (arg)) | 4503 | if (SYMBOLP (arg)) |
| 4485 | { | 4504 | { |
| @@ -4591,7 +4610,8 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4591 | || conversion == 'X')) | 4610 | || conversion == 'X')) |
| 4592 | error ("Invalid format operation %%%c", | 4611 | error ("Invalid format operation %%%c", |
| 4593 | STRING_CHAR ((unsigned char *) format - 1)); | 4612 | STRING_CHAR ((unsigned char *) format - 1)); |
| 4594 | else if (! (INTEGERP (arg) || (FLOATP (arg) && conversion != 'c'))) | 4613 | else if (! (FIXNUMP (arg) || ((BIGNUMP (arg) || FLOATP (arg)) |
| 4614 | && conversion != 'c'))) | ||
| 4595 | error ("Format specifier doesn't match argument type"); | 4615 | error ("Format specifier doesn't match argument type"); |
| 4596 | else | 4616 | else |
| 4597 | { | 4617 | { |
| @@ -4652,7 +4672,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4652 | if (INT_AS_LDBL) | 4672 | if (INT_AS_LDBL) |
| 4653 | { | 4673 | { |
| 4654 | *f = 'L'; | 4674 | *f = 'L'; |
| 4655 | f += INTEGERP (arg); | 4675 | f += FIXNUMP (arg); |
| 4656 | } | 4676 | } |
| 4657 | } | 4677 | } |
| 4658 | else if (conversion != 'c') | 4678 | else if (conversion != 'c') |
| @@ -4683,12 +4703,12 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4683 | ptrdiff_t sprintf_bytes; | 4703 | ptrdiff_t sprintf_bytes; |
| 4684 | if (float_conversion) | 4704 | if (float_conversion) |
| 4685 | { | 4705 | { |
| 4686 | if (INT_AS_LDBL && INTEGERP (arg)) | 4706 | if (INT_AS_LDBL && FIXNUMP (arg)) |
| 4687 | { | 4707 | { |
| 4688 | /* Although long double may have a rounding error if | 4708 | /* Although long double may have a rounding error if |
| 4689 | DIG_BITS_LBOUND * LDBL_MANT_DIG < FIXNUM_BITS - 1, | 4709 | DIG_BITS_LBOUND * LDBL_MANT_DIG < FIXNUM_BITS - 1, |
| 4690 | it is more accurate than plain 'double'. */ | 4710 | it is more accurate than plain 'double'. */ |
| 4691 | long double x = XINT (arg); | 4711 | long double x = XFIXNUM (arg); |
| 4692 | sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); | 4712 | sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); |
| 4693 | } | 4713 | } |
| 4694 | else | 4714 | else |
| @@ -4698,15 +4718,15 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4698 | else if (conversion == 'c') | 4718 | else if (conversion == 'c') |
| 4699 | { | 4719 | { |
| 4700 | /* Don't use sprintf here, as it might mishandle prec. */ | 4720 | /* Don't use sprintf here, as it might mishandle prec. */ |
| 4701 | sprintf_buf[0] = XINT (arg); | 4721 | sprintf_buf[0] = XFIXNUM (arg); |
| 4702 | sprintf_bytes = prec != 0; | 4722 | sprintf_bytes = prec != 0; |
| 4703 | sprintf_buf[sprintf_bytes] = '\0'; | 4723 | sprintf_buf[sprintf_bytes] = '\0'; |
| 4704 | } | 4724 | } |
| 4705 | else if (conversion == 'd' || conversion == 'i') | 4725 | else if (conversion == 'd' || conversion == 'i') |
| 4706 | { | 4726 | { |
| 4707 | if (INTEGERP (arg)) | 4727 | if (FIXNUMP (arg)) |
| 4708 | { | 4728 | { |
| 4709 | printmax_t x = XINT (arg); | 4729 | printmax_t x = XFIXNUM (arg); |
| 4710 | sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); | 4730 | sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); |
| 4711 | } | 4731 | } |
| 4712 | else | 4732 | else |
| @@ -4733,12 +4753,12 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4733 | { | 4753 | { |
| 4734 | if (binary_as_unsigned) | 4754 | if (binary_as_unsigned) |
| 4735 | { | 4755 | { |
| 4736 | x = XUINT (arg); | 4756 | x = XUFIXNUM (arg); |
| 4737 | negative = false; | 4757 | negative = false; |
| 4738 | } | 4758 | } |
| 4739 | else | 4759 | else |
| 4740 | { | 4760 | { |
| 4741 | EMACS_INT i = XINT (arg); | 4761 | EMACS_INT i = XFIXNUM (arg); |
| 4742 | negative = i < 0; | 4762 | negative = i < 0; |
| 4743 | x = negative ? -i : i; | 4763 | x = negative ? -i : i; |
| 4744 | } | 4764 | } |
| @@ -4979,8 +4999,8 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 4979 | if (string_intervals (args[0]) || arg_intervals) | 4999 | if (string_intervals (args[0]) || arg_intervals) |
| 4980 | { | 5000 | { |
| 4981 | /* Add text properties from the format string. */ | 5001 | /* Add text properties from the format string. */ |
| 4982 | Lisp_Object len = make_number (SCHARS (args[0])); | 5002 | Lisp_Object len = make_fixnum (SCHARS (args[0])); |
| 4983 | Lisp_Object props = text_property_list (args[0], make_number (0), | 5003 | Lisp_Object props = text_property_list (args[0], make_fixnum (0), |
| 4984 | len, Qnil); | 5004 | len, Qnil); |
| 4985 | if (CONSP (props)) | 5005 | if (CONSP (props)) |
| 4986 | { | 5006 | { |
| @@ -5004,7 +5024,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 5004 | Lisp_Object item = XCAR (list); | 5024 | Lisp_Object item = XCAR (list); |
| 5005 | 5025 | ||
| 5006 | /* First adjust the property start position. */ | 5026 | /* First adjust the property start position. */ |
| 5007 | ptrdiff_t pos = XINT (XCAR (item)); | 5027 | ptrdiff_t pos = XFIXNUM (XCAR (item)); |
| 5008 | 5028 | ||
| 5009 | /* Advance BYTEPOS, POSITION, TRANSLATED and ARGN | 5029 | /* Advance BYTEPOS, POSITION, TRANSLATED and ARGN |
| 5010 | up to this position. */ | 5030 | up to this position. */ |
| @@ -5025,10 +5045,10 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 5025 | } | 5045 | } |
| 5026 | } | 5046 | } |
| 5027 | 5047 | ||
| 5028 | XSETCAR (item, make_number (translated)); | 5048 | XSETCAR (item, make_fixnum (translated)); |
| 5029 | 5049 | ||
| 5030 | /* Likewise adjust the property end position. */ | 5050 | /* Likewise adjust the property end position. */ |
| 5031 | pos = XINT (XCAR (XCDR (item))); | 5051 | pos = XFIXNUM (XCAR (XCDR (item))); |
| 5032 | 5052 | ||
| 5033 | for (; position < pos; bytepos++) | 5053 | for (; position < pos; bytepos++) |
| 5034 | { | 5054 | { |
| @@ -5047,10 +5067,10 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 5047 | } | 5067 | } |
| 5048 | } | 5068 | } |
| 5049 | 5069 | ||
| 5050 | XSETCAR (XCDR (item), make_number (translated)); | 5070 | XSETCAR (XCDR (item), make_fixnum (translated)); |
| 5051 | } | 5071 | } |
| 5052 | 5072 | ||
| 5053 | add_text_properties_from_list (val, props, make_number (0)); | 5073 | add_text_properties_from_list (val, props, make_fixnum (0)); |
| 5054 | } | 5074 | } |
| 5055 | 5075 | ||
| 5056 | /* Add text properties from arguments. */ | 5076 | /* Add text properties from arguments. */ |
| @@ -5058,17 +5078,17 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 5058 | for (ptrdiff_t i = 0; i < nspec; i++) | 5078 | for (ptrdiff_t i = 0; i < nspec; i++) |
| 5059 | if (info[i].intervals) | 5079 | if (info[i].intervals) |
| 5060 | { | 5080 | { |
| 5061 | len = make_number (SCHARS (info[i].argument)); | 5081 | len = make_fixnum (SCHARS (info[i].argument)); |
| 5062 | Lisp_Object new_len = make_number (info[i].end - info[i].start); | 5082 | Lisp_Object new_len = make_fixnum (info[i].end - info[i].start); |
| 5063 | props = text_property_list (info[i].argument, | 5083 | props = text_property_list (info[i].argument, |
| 5064 | make_number (0), len, Qnil); | 5084 | make_fixnum (0), len, Qnil); |
| 5065 | props = extend_property_ranges (props, len, new_len); | 5085 | props = extend_property_ranges (props, len, new_len); |
| 5066 | /* If successive arguments have properties, be sure that | 5086 | /* If successive arguments have properties, be sure that |
| 5067 | the value of `composition' property be the copy. */ | 5087 | the value of `composition' property be the copy. */ |
| 5068 | if (1 < i && info[i - 1].end) | 5088 | if (1 < i && info[i - 1].end) |
| 5069 | make_composition_value_copy (props); | 5089 | make_composition_value_copy (props); |
| 5070 | add_text_properties_from_list (val, props, | 5090 | add_text_properties_from_list (val, props, |
| 5071 | make_number (info[i].start)); | 5091 | make_fixnum (info[i].start)); |
| 5072 | } | 5092 | } |
| 5073 | } | 5093 | } |
| 5074 | 5094 | ||
| @@ -5091,13 +5111,13 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */) | |||
| 5091 | CHECK_CHARACTER (c1); | 5111 | CHECK_CHARACTER (c1); |
| 5092 | CHECK_CHARACTER (c2); | 5112 | CHECK_CHARACTER (c2); |
| 5093 | 5113 | ||
| 5094 | if (XINT (c1) == XINT (c2)) | 5114 | if (XFIXNUM (c1) == XFIXNUM (c2)) |
| 5095 | return Qt; | 5115 | return Qt; |
| 5096 | if (NILP (BVAR (current_buffer, case_fold_search))) | 5116 | if (NILP (BVAR (current_buffer, case_fold_search))) |
| 5097 | return Qnil; | 5117 | return Qnil; |
| 5098 | 5118 | ||
| 5099 | i1 = XFASTINT (c1); | 5119 | i1 = XFIXNAT (c1); |
| 5100 | i2 = XFASTINT (c2); | 5120 | i2 = XFIXNAT (c2); |
| 5101 | 5121 | ||
| 5102 | /* FIXME: It is possible to compare multibyte characters even when | 5122 | /* FIXME: It is possible to compare multibyte characters even when |
| 5103 | the current buffer is unibyte. Unfortunately this is ambiguous | 5123 | the current buffer is unibyte. Unfortunately this is ambiguous |
| @@ -5241,10 +5261,10 @@ ring. */) | |||
| 5241 | validate_region (&startr1, &endr1); | 5261 | validate_region (&startr1, &endr1); |
| 5242 | validate_region (&startr2, &endr2); | 5262 | validate_region (&startr2, &endr2); |
| 5243 | 5263 | ||
| 5244 | start1 = XFASTINT (startr1); | 5264 | start1 = XFIXNAT (startr1); |
| 5245 | end1 = XFASTINT (endr1); | 5265 | end1 = XFIXNAT (endr1); |
| 5246 | start2 = XFASTINT (startr2); | 5266 | start2 = XFIXNAT (startr2); |
| 5247 | end2 = XFASTINT (endr2); | 5267 | end2 = XFIXNAT (endr2); |
| 5248 | gap = GPT; | 5268 | gap = GPT; |
| 5249 | 5269 | ||
| 5250 | /* Swap the regions if they're reversed. */ | 5270 | /* Swap the regions if they're reversed. */ |