aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-09-27 01:16:02 +0000
committerKarl Heuer1994-09-27 01:16:02 +0000
commit5d2fa46f6aeb30b073666f403f930e22e1318be7 (patch)
tree5456d0d06c6a370fcef9bf039a1c35421d2c69a8
parent38c0d37cf5913e69aa45726fa85049a11a631ec5 (diff)
downloademacs-5d2fa46f6aeb30b073666f403f930e22e1318be7.tar.gz
emacs-5d2fa46f6aeb30b073666f403f930e22e1318be7.zip
(validate_interval_range, add_properties, remove_properties,
Fnext_property_change, Fnext_single_property_change, Fprevious_property_change, Fprevious_single_property_change, Ftext_property_any, Ftext_property_not_all): Use type test macros.
-rw-r--r--src/textprop.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 5f3a4f254f3..666ca9c868d 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -117,7 +117,7 @@ validate_interval_range (object, begin, end, force)
117 *end = n; 117 *end = n;
118 } 118 }
119 119
120 if (XTYPE (object) == Lisp_Buffer) 120 if (BUFFERP (object))
121 { 121 {
122 register struct buffer *b = XBUFFER (object); 122 register struct buffer *b = XBUFFER (object);
123 123
@@ -358,7 +358,7 @@ add_properties (plist, i, object)
358 break; 358 break;
359 359
360 /* Record this change in the buffer, for undo purposes. */ 360 /* Record this change in the buffer, for undo purposes. */
361 if (XTYPE (object) == Lisp_Buffer) 361 if (BUFFERP (object))
362 { 362 {
363 modify_region (XBUFFER (object), 363 modify_region (XBUFFER (object),
364 make_number (i->position), 364 make_number (i->position),
@@ -376,7 +376,7 @@ add_properties (plist, i, object)
376 if (! found) 376 if (! found)
377 { 377 {
378 /* Record this change in the buffer, for undo purposes. */ 378 /* Record this change in the buffer, for undo purposes. */
379 if (XTYPE (object) == Lisp_Buffer) 379 if (BUFFERP (object))
380 { 380 {
381 modify_region (XBUFFER (object), 381 modify_region (XBUFFER (object),
382 make_number (i->position), 382 make_number (i->position),
@@ -414,7 +414,7 @@ remove_properties (plist, i, object)
414 /* First, remove the symbol if its at the head of the list */ 414 /* First, remove the symbol if its at the head of the list */
415 while (! NILP (current_plist) && EQ (sym, Fcar (current_plist))) 415 while (! NILP (current_plist) && EQ (sym, Fcar (current_plist)))
416 { 416 {
417 if (XTYPE (object) == Lisp_Buffer) 417 if (BUFFERP (object))
418 { 418 {
419 modify_region (XBUFFER (object), 419 modify_region (XBUFFER (object),
420 make_number (i->position), 420 make_number (i->position),
@@ -436,7 +436,7 @@ remove_properties (plist, i, object)
436 this = Fcdr (Fcdr (tail2)); 436 this = Fcdr (Fcdr (tail2));
437 if (EQ (sym, Fcar (this))) 437 if (EQ (sym, Fcar (this)))
438 { 438 {
439 if (XTYPE (object) == Lisp_Buffer) 439 if (BUFFERP (object))
440 { 440 {
441 modify_region (XBUFFER (object), 441 modify_region (XBUFFER (object),
442 make_number (i->position), 442 make_number (i->position),
@@ -609,7 +609,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
609 if (! NILP (limit) && !(next->position < XFASTINT (limit))) 609 if (! NILP (limit) && !(next->position < XFASTINT (limit)))
610 return limit; 610 return limit;
611 611
612 XFASTINT (pos) = next->position - (XTYPE (object) == Lisp_String); 612 XFASTINT (pos) = next->position - (STRINGP (object));
613 return pos; 613 return pos;
614} 614}
615 615
@@ -684,7 +684,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
684 if (! NILP (limit) && !(next->position < XFASTINT (limit))) 684 if (! NILP (limit) && !(next->position < XFASTINT (limit)))
685 return limit; 685 return limit;
686 686
687 XFASTINT (pos) = next->position - (XTYPE (object) == Lisp_String); 687 XFASTINT (pos) = next->position - (STRINGP (object));
688 return pos; 688 return pos;
689} 689}
690 690
@@ -729,7 +729,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
729 return limit; 729 return limit;
730 730
731 XFASTINT (pos) = (previous->position + LENGTH (previous) 731 XFASTINT (pos) = (previous->position + LENGTH (previous)
732 - (XTYPE (object) == Lisp_String)); 732 - (STRINGP (object)));
733 return pos; 733 return pos;
734} 734}
735 735
@@ -779,7 +779,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
779 return limit; 779 return limit;
780 780
781 XFASTINT (pos) = (previous->position + LENGTH (previous) 781 XFASTINT (pos) = (previous->position + LENGTH (previous)
782 - (XTYPE (object) == Lisp_String)); 782 - (STRINGP (object)));
783 return pos; 783 return pos;
784} 784}
785 785
@@ -1084,7 +1084,7 @@ containing the text.")
1084 pos = i->position; 1084 pos = i->position;
1085 if (pos < XINT (start)) 1085 if (pos < XINT (start))
1086 pos = XINT (start); 1086 pos = XINT (start);
1087 return make_number (pos - (XTYPE (object) == Lisp_String)); 1087 return make_number (pos - (STRINGP (object)));
1088 } 1088 }
1089 i = next_interval (i); 1089 i = next_interval (i);
1090 } 1090 }
@@ -1120,7 +1120,7 @@ containing the text.")
1120 { 1120 {
1121 if (i->position > s) 1121 if (i->position > s)
1122 s = i->position; 1122 s = i->position;
1123 return make_number (s - (XTYPE (object) == Lisp_String)); 1123 return make_number (s - (STRINGP (object)));
1124 } 1124 }
1125 i = next_interval (i); 1125 i = next_interval (i);
1126 } 1126 }