Mercurial > emacs
comparison src/textprop.c @ 40656:cdfd4d09b79a
Update usage of CHECK_ macros (remove unused second argument).
| author | Pavel Jan?k <Pavel@Janik.cz> |
|---|---|
| date | Fri, 02 Nov 2001 20:46:55 +0000 |
| parents | e673a8c97e47 |
| children | 95756d215716 |
comparison
equal
deleted
inserted
replaced
| 40655:45453187feeb | 40656:cdfd4d09b79a |
|---|---|
| 121 int force; | 121 int force; |
| 122 { | 122 { |
| 123 register INTERVAL i; | 123 register INTERVAL i; |
| 124 int searchpos; | 124 int searchpos; |
| 125 | 125 |
| 126 CHECK_STRING_OR_BUFFER (object, 0); | 126 CHECK_STRING_OR_BUFFER (object); |
| 127 CHECK_NUMBER_COERCE_MARKER (*begin, 0); | 127 CHECK_NUMBER_COERCE_MARKER (*begin); |
| 128 CHECK_NUMBER_COERCE_MARKER (*end, 0); | 128 CHECK_NUMBER_COERCE_MARKER (*end); |
| 129 | 129 |
| 130 /* If we are asked for a point, but from a subr which operates | 130 /* If we are asked for a point, but from a subr which operates |
| 131 on a range, then return nothing. */ | 131 on a range, then return nothing. */ |
| 132 if (EQ (*begin, *end) && begin != end) | 132 if (EQ (*begin, *end) && begin != end) |
| 133 return NULL_INTERVAL; | 133 return NULL_INTERVAL; |
| 503 if (NILP (object)) | 503 if (NILP (object)) |
| 504 XSETBUFFER (object, current_buffer); | 504 XSETBUFFER (object, current_buffer); |
| 505 else if (EQ (object, Qt)) | 505 else if (EQ (object, Qt)) |
| 506 return NULL_INTERVAL; | 506 return NULL_INTERVAL; |
| 507 | 507 |
| 508 CHECK_STRING_OR_BUFFER (object, 0); | 508 CHECK_STRING_OR_BUFFER (object); |
| 509 | 509 |
| 510 if (BUFFERP (object)) | 510 if (BUFFERP (object)) |
| 511 { | 511 { |
| 512 register struct buffer *b = XBUFFER (object); | 512 register struct buffer *b = XBUFFER (object); |
| 513 | 513 |
| 587 register Lisp_Object prop; | 587 register Lisp_Object prop; |
| 588 Lisp_Object *overlay; | 588 Lisp_Object *overlay; |
| 589 { | 589 { |
| 590 struct window *w = 0; | 590 struct window *w = 0; |
| 591 | 591 |
| 592 CHECK_NUMBER_COERCE_MARKER (position, 0); | 592 CHECK_NUMBER_COERCE_MARKER (position); |
| 593 | 593 |
| 594 if (NILP (object)) | 594 if (NILP (object)) |
| 595 XSETBUFFER (object, current_buffer); | 595 XSETBUFFER (object, current_buffer); |
| 596 | 596 |
| 597 if (WINDOWP (object)) | 597 if (WINDOWP (object)) |
| 685 Lisp_Object temp; | 685 Lisp_Object temp; |
| 686 | 686 |
| 687 temp = Fnext_overlay_change (position); | 687 temp = Fnext_overlay_change (position); |
| 688 if (! NILP (limit)) | 688 if (! NILP (limit)) |
| 689 { | 689 { |
| 690 CHECK_NUMBER (limit, 2); | 690 CHECK_NUMBER (limit); |
| 691 if (XINT (limit) < XINT (temp)) | 691 if (XINT (limit) < XINT (temp)) |
| 692 temp = limit; | 692 temp = limit; |
| 693 } | 693 } |
| 694 return Fnext_property_change (position, Qnil, temp); | 694 return Fnext_property_change (position, Qnil, temp); |
| 695 } | 695 } |
| 710 Lisp_Object temp; | 710 Lisp_Object temp; |
| 711 | 711 |
| 712 temp = Fprevious_overlay_change (position); | 712 temp = Fprevious_overlay_change (position); |
| 713 if (! NILP (limit)) | 713 if (! NILP (limit)) |
| 714 { | 714 { |
| 715 CHECK_NUMBER (limit, 2); | 715 CHECK_NUMBER (limit); |
| 716 if (XINT (limit) > XINT (temp)) | 716 if (XINT (limit) > XINT (temp)) |
| 717 temp = limit; | 717 temp = limit; |
| 718 } | 718 } |
| 719 return Fprevious_property_change (position, Qnil, temp); | 719 return Fprevious_property_change (position, Qnil, temp); |
| 720 } | 720 } |
| 749 { | 749 { |
| 750 Lisp_Object initial_value, value; | 750 Lisp_Object initial_value, value; |
| 751 int count = specpdl_ptr - specpdl; | 751 int count = specpdl_ptr - specpdl; |
| 752 | 752 |
| 753 if (! NILP (object)) | 753 if (! NILP (object)) |
| 754 CHECK_BUFFER (object, 0); | 754 CHECK_BUFFER (object); |
| 755 | 755 |
| 756 if (BUFFERP (object) && current_buffer != XBUFFER (object)) | 756 if (BUFFERP (object) && current_buffer != XBUFFER (object)) |
| 757 { | 757 { |
| 758 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 758 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 759 Fset_buffer (object); | 759 Fset_buffer (object); |
| 762 initial_value = Fget_char_property (position, prop, object); | 762 initial_value = Fget_char_property (position, prop, object); |
| 763 | 763 |
| 764 if (NILP (limit)) | 764 if (NILP (limit)) |
| 765 XSETFASTINT (limit, BUF_ZV (current_buffer)); | 765 XSETFASTINT (limit, BUF_ZV (current_buffer)); |
| 766 else | 766 else |
| 767 CHECK_NUMBER_COERCE_MARKER (limit, 0); | 767 CHECK_NUMBER_COERCE_MARKER (limit); |
| 768 | 768 |
| 769 for (;;) | 769 for (;;) |
| 770 { | 770 { |
| 771 position = Fnext_char_property_change (position, limit); | 771 position = Fnext_char_property_change (position, limit); |
| 772 if (XFASTINT (position) >= XFASTINT (limit)) { | 772 if (XFASTINT (position) >= XFASTINT (limit)) { |
| 814 else | 814 else |
| 815 { | 815 { |
| 816 int count = specpdl_ptr - specpdl; | 816 int count = specpdl_ptr - specpdl; |
| 817 | 817 |
| 818 if (! NILP (object)) | 818 if (! NILP (object)) |
| 819 CHECK_BUFFER (object, 0); | 819 CHECK_BUFFER (object); |
| 820 | 820 |
| 821 if (BUFFERP (object) && current_buffer != XBUFFER (object)) | 821 if (BUFFERP (object) && current_buffer != XBUFFER (object)) |
| 822 { | 822 { |
| 823 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 823 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 824 Fset_buffer (object); | 824 Fset_buffer (object); |
| 825 } | 825 } |
| 826 | 826 |
| 827 if (NILP (limit)) | 827 if (NILP (limit)) |
| 828 XSETFASTINT (limit, BUF_BEGV (current_buffer)); | 828 XSETFASTINT (limit, BUF_BEGV (current_buffer)); |
| 829 else | 829 else |
| 830 CHECK_NUMBER_COERCE_MARKER (limit, 0); | 830 CHECK_NUMBER_COERCE_MARKER (limit); |
| 831 | 831 |
| 832 if (XFASTINT (position) <= XFASTINT (limit)) | 832 if (XFASTINT (position) <= XFASTINT (limit)) |
| 833 position = limit; | 833 position = limit; |
| 834 else | 834 else |
| 835 { | 835 { |
| 882 | 882 |
| 883 if (NILP (object)) | 883 if (NILP (object)) |
| 884 XSETBUFFER (object, current_buffer); | 884 XSETBUFFER (object, current_buffer); |
| 885 | 885 |
| 886 if (! NILP (limit) && ! EQ (limit, Qt)) | 886 if (! NILP (limit) && ! EQ (limit, Qt)) |
| 887 CHECK_NUMBER_COERCE_MARKER (limit, 0); | 887 CHECK_NUMBER_COERCE_MARKER (limit); |
| 888 | 888 |
| 889 i = validate_interval_range (object, &position, &position, soft); | 889 i = validate_interval_range (object, &position, &position, soft); |
| 890 | 890 |
| 891 /* If LIMIT is t, return start of next interval--don't | 891 /* If LIMIT is t, return start of next interval--don't |
| 892 bother checking further intervals. */ | 892 bother checking further intervals. */ |
| 976 | 976 |
| 977 if (NILP (object)) | 977 if (NILP (object)) |
| 978 XSETBUFFER (object, current_buffer); | 978 XSETBUFFER (object, current_buffer); |
| 979 | 979 |
| 980 if (!NILP (limit)) | 980 if (!NILP (limit)) |
| 981 CHECK_NUMBER_COERCE_MARKER (limit, 0); | 981 CHECK_NUMBER_COERCE_MARKER (limit); |
| 982 | 982 |
| 983 i = validate_interval_range (object, &position, &position, soft); | 983 i = validate_interval_range (object, &position, &position, soft); |
| 984 if (NULL_INTERVAL_P (i)) | 984 if (NULL_INTERVAL_P (i)) |
| 985 return limit; | 985 return limit; |
| 986 | 986 |
| 1017 | 1017 |
| 1018 if (NILP (object)) | 1018 if (NILP (object)) |
| 1019 XSETBUFFER (object, current_buffer); | 1019 XSETBUFFER (object, current_buffer); |
| 1020 | 1020 |
| 1021 if (!NILP (limit)) | 1021 if (!NILP (limit)) |
| 1022 CHECK_NUMBER_COERCE_MARKER (limit, 0); | 1022 CHECK_NUMBER_COERCE_MARKER (limit); |
| 1023 | 1023 |
| 1024 i = validate_interval_range (object, &position, &position, soft); | 1024 i = validate_interval_range (object, &position, &position, soft); |
| 1025 if (NULL_INTERVAL_P (i)) | 1025 if (NULL_INTERVAL_P (i)) |
| 1026 return limit; | 1026 return limit; |
| 1027 | 1027 |
| 1063 | 1063 |
| 1064 if (NILP (object)) | 1064 if (NILP (object)) |
| 1065 XSETBUFFER (object, current_buffer); | 1065 XSETBUFFER (object, current_buffer); |
| 1066 | 1066 |
| 1067 if (!NILP (limit)) | 1067 if (!NILP (limit)) |
| 1068 CHECK_NUMBER_COERCE_MARKER (limit, 0); | 1068 CHECK_NUMBER_COERCE_MARKER (limit); |
| 1069 | 1069 |
| 1070 i = validate_interval_range (object, &position, &position, soft); | 1070 i = validate_interval_range (object, &position, &position, soft); |
| 1071 | 1071 |
| 1072 /* Start with the interval containing the char before point. */ | 1072 /* Start with the interval containing the char before point. */ |
| 1073 if (! NULL_INTERVAL_P (i) && i->position == XFASTINT (position)) | 1073 if (! NULL_INTERVAL_P (i) && i->position == XFASTINT (position)) |
| 1560 | 1560 |
| 1561 i = validate_interval_range (src, &start, &end, soft); | 1561 i = validate_interval_range (src, &start, &end, soft); |
| 1562 if (NULL_INTERVAL_P (i)) | 1562 if (NULL_INTERVAL_P (i)) |
| 1563 return Qnil; | 1563 return Qnil; |
| 1564 | 1564 |
| 1565 CHECK_NUMBER_COERCE_MARKER (pos, 0); | 1565 CHECK_NUMBER_COERCE_MARKER (pos); |
| 1566 { | 1566 { |
| 1567 Lisp_Object dest_start, dest_end; | 1567 Lisp_Object dest_start, dest_end; |
| 1568 | 1568 |
| 1569 dest_start = pos; | 1569 dest_start = pos; |
| 1570 XSETFASTINT (dest_end, XINT (dest_start) + (XINT (end) - XINT (start))); | 1570 XSETFASTINT (dest_end, XINT (dest_start) + (XINT (end) - XINT (start))); |
