aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Naggum1996-01-09 00:34:01 +0000
committerErik Naggum1996-01-09 00:34:01 +0000
commit1f5e848a11bd55292ddc60a967f229fbda878235 (patch)
treebedcf1bbea52a125c493ab3e9e0824912333a596 /src
parent2203e1e8b799f0dc3f6c11d4e66979f098a68edc (diff)
downloademacs-1f5e848a11bd55292ddc60a967f229fbda878235.tar.gz
emacs-1f5e848a11bd55292ddc60a967f229fbda878235.zip
(Ftext_properties_at, Fget_text_property, Fget_char_property,
Fnext_property_change, Fnext_single_property_change, Fprevious_property_change, Fprevious_single_property_change, Fadd_text_properties, Fput_text_property, Fset_text_properties, Fremove_text_properties, Ftext_property_any, Ftext_property_not_all): Harmonize arguments with documentation.
Diffstat (limited to 'src')
-rw-r--r--src/textprop.c176
1 files changed, 88 insertions, 88 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 85f8c5ed1c7..0133c68b4fa 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -510,53 +510,53 @@ DEFUN ("text-properties-at", Ftext_properties_at,
510in optional argument OBJECT, a string or buffer. If nil, OBJECT\n\ 510in optional argument OBJECT, a string or buffer. If nil, OBJECT\n\
511defaults to the current buffer.\n\ 511defaults to the current buffer.\n\
512If POSITION is at the end of OBJECT, the value is nil.") 512If POSITION is at the end of OBJECT, the value is nil.")
513 (pos, object) 513 (position, object)
514 Lisp_Object pos, object; 514 Lisp_Object position, object;
515{ 515{
516 register INTERVAL i; 516 register INTERVAL i;
517 517
518 if (NILP (object)) 518 if (NILP (object))
519 XSETBUFFER (object, current_buffer); 519 XSETBUFFER (object, current_buffer);
520 520
521 i = validate_interval_range (object, &pos, &pos, soft); 521 i = validate_interval_range (object, &position, &position, soft);
522 if (NULL_INTERVAL_P (i)) 522 if (NULL_INTERVAL_P (i))
523 return Qnil; 523 return Qnil;
524 /* If POS is at the end of the interval, 524 /* If POSITION is at the end of the interval,
525 it means it's the end of OBJECT. 525 it means it's the end of OBJECT.
526 There are no properties at the very end, 526 There are no properties at the very end,
527 since no character follows. */ 527 since no character follows. */
528 if (XINT (pos) == LENGTH (i) + i->position) 528 if (XINT (position) == LENGTH (i) + i->position)
529 return Qnil; 529 return Qnil;
530 530
531 return i->plist; 531 return i->plist;
532} 532}
533 533
534DEFUN ("get-text-property", Fget_text_property, Sget_text_property, 2, 3, 0, 534DEFUN ("get-text-property", Fget_text_property, Sget_text_property, 2, 3, 0,
535 "Return the value of position POS's property PROP, in OBJECT.\n\ 535 "Return the value of POSITION's property PROP, in OBJECT.\n\
536OBJECT is optional and defaults to the current buffer.\n\ 536OBJECT is optional and defaults to the current buffer.\n\
537If POSITION is at the end of OBJECT, the value is nil.") 537If POSITION is at the end of OBJECT, the value is nil.")
538 (pos, prop, object) 538 (position, prop, object)
539 Lisp_Object pos, object; 539 Lisp_Object position, object;
540 Lisp_Object prop; 540 Lisp_Object prop;
541{ 541{
542 return textget (Ftext_properties_at (pos, object), prop); 542 return textget (Ftext_properties_at (position, object), prop);
543} 543}
544 544
545DEFUN ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0, 545DEFUN ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0,
546 "Return the value of position POS's property PROP, in OBJECT.\n\ 546 "Return the value of POSITION's property PROP, in OBJECT.\n\
547OBJECT is optional and defaults to the current buffer.\n\ 547OBJECT is optional and defaults to the current buffer.\n\
548If POS is at the end of OBJECT, the value is nil.\n\ 548If POSITION is at the end of OBJECT, the value is nil.\n\
549If OBJECT is a buffer, then overlay properties are considered as well as\n\ 549If OBJECT is a buffer, then overlay properties are considered as well as\n\
550text properties.\n\ 550text properties.\n\
551If OBJECT is a window, then that window's buffer is used, but window-specific\n\ 551If OBJECT is a window, then that window's buffer is used, but window-specific\n\
552overlays are considered only if they are associated with OBJECT.") 552overlays are considered only if they are associated with OBJECT.")
553 (pos, prop, object) 553 (position, prop, object)
554 Lisp_Object pos, object; 554 Lisp_Object position, object;
555 register Lisp_Object prop; 555 register Lisp_Object prop;
556{ 556{
557 struct window *w = 0; 557 struct window *w = 0;
558 558
559 CHECK_NUMBER_COERCE_MARKER (pos, 0); 559 CHECK_NUMBER_COERCE_MARKER (position, 0);
560 560
561 if (NILP (object)) 561 if (NILP (object))
562 XSETBUFFER (object, current_buffer); 562 XSETBUFFER (object, current_buffer);
@@ -568,7 +568,7 @@ overlays are considered only if they are associated with OBJECT.")
568 } 568 }
569 if (BUFFERP (object)) 569 if (BUFFERP (object))
570 { 570 {
571 int posn = XINT (pos); 571 int posn = XINT (position);
572 int noverlays; 572 int noverlays;
573 Lisp_Object *overlay_vec, tem; 573 Lisp_Object *overlay_vec, tem;
574 int next_overlay; 574 int next_overlay;
@@ -607,21 +607,21 @@ overlays are considered only if they are associated with OBJECT.")
607 } 607 }
608 /* Not a buffer, or no appropriate overlay, so fall through to the 608 /* Not a buffer, or no appropriate overlay, so fall through to the
609 simpler case. */ 609 simpler case. */
610 return (Fget_text_property (pos, prop, object)); 610 return (Fget_text_property (position, prop, object));
611} 611}
612 612
613DEFUN ("next-property-change", Fnext_property_change, 613DEFUN ("next-property-change", Fnext_property_change,
614 Snext_property_change, 1, 3, 0, 614 Snext_property_change, 1, 3, 0,
615 "Return the position of next property change.\n\ 615 "Return the position of next property change.\n\
616Scans characters forward from POS in OBJECT till it finds\n\ 616Scans characters forward from POSITION in OBJECT till it finds\n\
617a change in some text property, then returns the position of the change.\n\ 617a change in some text property, then returns the position of the change.\n\
618The optional second argument OBJECT is the string or buffer to scan.\n\ 618The optional second argument OBJECT is the string or buffer to scan.\n\
619Return nil if the property is constant all the way to the end of OBJECT.\n\ 619Return nil if the property is constant all the way to the end of OBJECT.\n\
620If the value is non-nil, it is a position greater than POS, never equal.\n\n\ 620If the value is non-nil, it is a position greater than POSITION, never equal.\n\n\
621If the optional third argument LIMIT is non-nil, don't search\n\ 621If the optional third argument LIMIT is non-nil, don't search\n\
622past position LIMIT; return LIMIT if nothing is found before LIMIT.") 622past position LIMIT; return LIMIT if nothing is found before LIMIT.")
623 (pos, object, limit) 623 (position, object, limit)
624 Lisp_Object pos, object, limit; 624 Lisp_Object position, object, limit;
625{ 625{
626 register INTERVAL i, next; 626 register INTERVAL i, next;
627 627
@@ -631,7 +631,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
631 if (! NILP (limit) && ! EQ (limit, Qt)) 631 if (! NILP (limit) && ! EQ (limit, Qt))
632 CHECK_NUMBER_COERCE_MARKER (limit, 0); 632 CHECK_NUMBER_COERCE_MARKER (limit, 0);
633 633
634 i = validate_interval_range (object, &pos, &pos, soft); 634 i = validate_interval_range (object, &position, &position, soft);
635 635
636 /* If LIMIT is t, return start of next interval--don't 636 /* If LIMIT is t, return start of next interval--don't
637 bother checking further intervals. */ 637 bother checking further intervals. */
@@ -643,12 +643,12 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
643 next = next_interval (i); 643 next = next_interval (i);
644 644
645 if (NULL_INTERVAL_P (next)) 645 if (NULL_INTERVAL_P (next))
646 XSETFASTINT (pos, (STRINGP (object) 646 XSETFASTINT (position, (STRINGP (object)
647 ? XSTRING (object)->size 647 ? XSTRING (object)->size
648 : BUF_ZV (XBUFFER (object)))); 648 : BUF_ZV (XBUFFER (object))));
649 else 649 else
650 XSETFASTINT (pos, next->position - (STRINGP (object))); 650 XSETFASTINT (position, next->position - (STRINGP (object)));
651 return pos; 651 return position;
652 } 652 }
653 653
654 if (NULL_INTERVAL_P (i)) 654 if (NULL_INTERVAL_P (i))
@@ -665,8 +665,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
665 if (! NILP (limit) && !(next->position < XFASTINT (limit))) 665 if (! NILP (limit) && !(next->position < XFASTINT (limit)))
666 return limit; 666 return limit;
667 667
668 XSETFASTINT (pos, next->position - (STRINGP (object))); 668 XSETFASTINT (position, next->position - (STRINGP (object)));
669 return pos; 669 return position;
670} 670}
671 671
672/* Return 1 if there's a change in some property between BEG and END. */ 672/* Return 1 if there's a change in some property between BEG and END. */
@@ -704,16 +704,16 @@ property_change_between_p (beg, end)
704DEFUN ("next-single-property-change", Fnext_single_property_change, 704DEFUN ("next-single-property-change", Fnext_single_property_change,
705 Snext_single_property_change, 2, 4, 0, 705 Snext_single_property_change, 2, 4, 0,
706 "Return the position of next property change for a specific property.\n\ 706 "Return the position of next property change for a specific property.\n\
707Scans characters forward from POS till it finds\n\ 707Scans characters forward from POSITION till it finds\n\
708a change in the PROP property, then returns the position of the change.\n\ 708a change in the PROP property, then returns the position of the change.\n\
709The optional third argument OBJECT is the string or buffer to scan.\n\ 709The optional third argument OBJECT is the string or buffer to scan.\n\
710The property values are compared with `eq'.\n\ 710The property values are compared with `eq'.\n\
711Return nil if the property is constant all the way to the end of OBJECT.\n\ 711Return nil if the property is constant all the way to the end of OBJECT.\n\
712If the value is non-nil, it is a position greater than POS, never equal.\n\n\ 712If the value is non-nil, it is a position greater than POSITION, never equal.\n\n\
713If the optional fourth argument LIMIT is non-nil, don't search\n\ 713If the optional fourth argument LIMIT is non-nil, don't search\n\
714past position LIMIT; return LIMIT if nothing is found before LIMIT.") 714past position LIMIT; return LIMIT if nothing is found before LIMIT.")
715 (pos, prop, object, limit) 715 (position, prop, object, limit)
716 Lisp_Object pos, prop, object, limit; 716 Lisp_Object position, prop, object, limit;
717{ 717{
718 register INTERVAL i, next; 718 register INTERVAL i, next;
719 register Lisp_Object here_val; 719 register Lisp_Object here_val;
@@ -724,7 +724,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
724 if (!NILP (limit)) 724 if (!NILP (limit))
725 CHECK_NUMBER_COERCE_MARKER (limit, 0); 725 CHECK_NUMBER_COERCE_MARKER (limit, 0);
726 726
727 i = validate_interval_range (object, &pos, &pos, soft); 727 i = validate_interval_range (object, &position, &position, soft);
728 if (NULL_INTERVAL_P (i)) 728 if (NULL_INTERVAL_P (i))
729 return limit; 729 return limit;
730 730
@@ -740,22 +740,22 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
740 if (! NILP (limit) && !(next->position < XFASTINT (limit))) 740 if (! NILP (limit) && !(next->position < XFASTINT (limit)))
741 return limit; 741 return limit;
742 742
743 XSETFASTINT (pos, next->position - (STRINGP (object))); 743 XSETFASTINT (position, next->position - (STRINGP (object)));
744 return pos; 744 return position;
745} 745}
746 746
747DEFUN ("previous-property-change", Fprevious_property_change, 747DEFUN ("previous-property-change", Fprevious_property_change,
748 Sprevious_property_change, 1, 3, 0, 748 Sprevious_property_change, 1, 3, 0,
749 "Return the position of previous property change.\n\ 749 "Return the position of previous property change.\n\
750Scans characters backwards from POS in OBJECT till it finds\n\ 750Scans characters backwards from POSITION in OBJECT till it finds\n\
751a change in some text property, then returns the position of the change.\n\ 751a change in some text property, then returns the position of the change.\n\
752The optional second argument OBJECT is the string or buffer to scan.\n\ 752The optional second argument OBJECT is the string or buffer to scan.\n\
753Return nil if the property is constant all the way to the start of OBJECT.\n\ 753Return nil if the property is constant all the way to the start of OBJECT.\n\
754If the value is non-nil, it is a position less than POS, never equal.\n\n\ 754If the value is non-nil, it is a position less than POSITION, never equal.\n\n\
755If the optional third argument LIMIT is non-nil, don't search\n\ 755If the optional third argument LIMIT is non-nil, don't search\n\
756back past position LIMIT; return LIMIT if nothing is found until LIMIT.") 756back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
757 (pos, object, limit) 757 (position, object, limit)
758 Lisp_Object pos, object, limit; 758 Lisp_Object position, object, limit;
759{ 759{
760 register INTERVAL i, previous; 760 register INTERVAL i, previous;
761 761
@@ -765,12 +765,12 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
765 if (!NILP (limit)) 765 if (!NILP (limit))
766 CHECK_NUMBER_COERCE_MARKER (limit, 0); 766 CHECK_NUMBER_COERCE_MARKER (limit, 0);
767 767
768 i = validate_interval_range (object, &pos, &pos, soft); 768 i = validate_interval_range (object, &position, &position, soft);
769 if (NULL_INTERVAL_P (i)) 769 if (NULL_INTERVAL_P (i))
770 return limit; 770 return limit;
771 771
772 /* Start with the interval containing the char before point. */ 772 /* Start with the interval containing the char before point. */
773 if (i->position == XFASTINT (pos)) 773 if (i->position == XFASTINT (position))
774 i = previous_interval (i); 774 i = previous_interval (i);
775 775
776 previous = previous_interval (i); 776 previous = previous_interval (i);
@@ -784,24 +784,24 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
784 && !(previous->position + LENGTH (previous) > XFASTINT (limit))) 784 && !(previous->position + LENGTH (previous) > XFASTINT (limit)))
785 return limit; 785 return limit;
786 786
787 XSETFASTINT (pos, (previous->position + LENGTH (previous) 787 XSETFASTINT (position, (previous->position + LENGTH (previous)
788 - (STRINGP (object)))); 788 - (STRINGP (object))));
789 return pos; 789 return position;
790} 790}
791 791
792DEFUN ("previous-single-property-change", Fprevious_single_property_change, 792DEFUN ("previous-single-property-change", Fprevious_single_property_change,
793 Sprevious_single_property_change, 2, 4, 0, 793 Sprevious_single_property_change, 2, 4, 0,
794 "Return the position of previous property change for a specific property.\n\ 794 "Return the position of previous property change for a specific property.\n\
795Scans characters backward from POS till it finds\n\ 795Scans characters backward from POSITION till it finds\n\
796a change in the PROP property, then returns the position of the change.\n\ 796a change in the PROP property, then returns the position of the change.\n\
797The optional third argument OBJECT is the string or buffer to scan.\n\ 797The optional third argument OBJECT is the string or buffer to scan.\n\
798The property values are compared with `eq'.\n\ 798The property values are compared with `eq'.\n\
799Return nil if the property is constant all the way to the start of OBJECT.\n\ 799Return nil if the property is constant all the way to the start of OBJECT.\n\
800If the value is non-nil, it is a position less than POS, never equal.\n\n\ 800If the value is non-nil, it is a position less than POSITION, never equal.\n\n\
801If the optional fourth argument LIMIT is non-nil, don't search\n\ 801If the optional fourth argument LIMIT is non-nil, don't search\n\
802back past position LIMIT; return LIMIT if nothing is found until LIMIT.") 802back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
803 (pos, prop, object, limit) 803 (position, prop, object, limit)
804 Lisp_Object pos, prop, object, limit; 804 Lisp_Object position, prop, object, limit;
805{ 805{
806 register INTERVAL i, previous; 806 register INTERVAL i, previous;
807 register Lisp_Object here_val; 807 register Lisp_Object here_val;
@@ -812,10 +812,10 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
812 if (!NILP (limit)) 812 if (!NILP (limit))
813 CHECK_NUMBER_COERCE_MARKER (limit, 0); 813 CHECK_NUMBER_COERCE_MARKER (limit, 0);
814 814
815 i = validate_interval_range (object, &pos, &pos, soft); 815 i = validate_interval_range (object, &position, &position, soft);
816 816
817 /* Start with the interval containing the char before point. */ 817 /* Start with the interval containing the char before point. */
818 if (! NULL_INTERVAL_P (i) && i->position == XFASTINT (pos)) 818 if (! NULL_INTERVAL_P (i) && i->position == XFASTINT (position))
819 i = previous_interval (i); 819 i = previous_interval (i);
820 820
821 if (NULL_INTERVAL_P (i)) 821 if (NULL_INTERVAL_P (i))
@@ -834,9 +834,9 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
834 && !(previous->position + LENGTH (previous) > XFASTINT (limit))) 834 && !(previous->position + LENGTH (previous) > XFASTINT (limit)))
835 return limit; 835 return limit;
836 836
837 XSETFASTINT (pos, (previous->position + LENGTH (previous) 837 XSETFASTINT (position, (previous->position + LENGTH (previous)
838 - (STRINGP (object)))); 838 - (STRINGP (object))));
839 return pos; 839 return position;
840} 840}
841 841
842/* Callers note, this can GC when OBJECT is a buffer (or nil). */ 842/* Callers note, this can GC when OBJECT is a buffer (or nil). */
@@ -844,7 +844,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
844DEFUN ("add-text-properties", Fadd_text_properties, 844DEFUN ("add-text-properties", Fadd_text_properties,
845 Sadd_text_properties, 3, 4, 0, 845 Sadd_text_properties, 3, 4, 0,
846 "Add properties to the text from START to END.\n\ 846 "Add properties to the text from START to END.\n\
847The third argument PROPS is a property list\n\ 847The third argument PROPERTIES is a property list\n\
848specifying the property values to add.\n\ 848specifying the property values to add.\n\
849The optional fourth argument, OBJECT,\n\ 849The optional fourth argument, OBJECT,\n\
850is the string or buffer containing the text.\n\ 850is the string or buffer containing the text.\n\
@@ -937,15 +937,15 @@ Return t if any property value actually changed, nil otherwise.")
937DEFUN ("put-text-property", Fput_text_property, 937DEFUN ("put-text-property", Fput_text_property,
938 Sput_text_property, 4, 5, 0, 938 Sput_text_property, 4, 5, 0,
939 "Set one property of the text from START to END.\n\ 939 "Set one property of the text from START to END.\n\
940The third and fourth arguments PROP and VALUE\n\ 940The third and fourth arguments PROPERTY and VALUE\n\
941specify the property to add.\n\ 941specify the property to add.\n\
942The optional fifth argument, OBJECT,\n\ 942The optional fifth argument, OBJECT,\n\
943is the string or buffer containing the text.") 943is the string or buffer containing the text.")
944 (start, end, prop, value, object) 944 (start, end, property, value, object)
945 Lisp_Object start, end, prop, value, object; 945 Lisp_Object start, end, property, value, object;
946{ 946{
947 Fadd_text_properties (start, end, 947 Fadd_text_properties (start, end,
948 Fcons (prop, Fcons (value, Qnil)), 948 Fcons (property, Fcons (value, Qnil)),
949 object); 949 object);
950 return Qnil; 950 return Qnil;
951} 951}
@@ -953,11 +953,11 @@ is the string or buffer containing the text.")
953DEFUN ("set-text-properties", Fset_text_properties, 953DEFUN ("set-text-properties", Fset_text_properties,
954 Sset_text_properties, 3, 4, 0, 954 Sset_text_properties, 3, 4, 0,
955 "Completely replace properties of text from START to END.\n\ 955 "Completely replace properties of text from START to END.\n\
956The third argument PROPS is the new property list.\n\ 956The third argument PROPERTIES is the new property list.\n\
957The optional fourth argument, OBJECT,\n\ 957The optional fourth argument, OBJECT,\n\
958is the string or buffer containing the text.") 958is the string or buffer containing the text.")
959 (start, end, props, object) 959 (start, end, properties, object)
960 Lisp_Object start, end, props, object; 960 Lisp_Object start, end, properties, object;
961{ 961{
962 register INTERVAL i, unchanged; 962 register INTERVAL i, unchanged;
963 register INTERVAL prev_changed = NULL_INTERVAL; 963 register INTERVAL prev_changed = NULL_INTERVAL;
@@ -967,14 +967,14 @@ is the string or buffer containing the text.")
967 ostart = start; 967 ostart = start;
968 oend = end; 968 oend = end;
969 969
970 props = validate_plist (props); 970 properties = validate_plist (properties);
971 971
972 if (NILP (object)) 972 if (NILP (object))
973 XSETBUFFER (object, current_buffer); 973 XSETBUFFER (object, current_buffer);
974 974
975 /* If we want no properties for a whole string, 975 /* If we want no properties for a whole string,
976 get rid of its intervals. */ 976 get rid of its intervals. */
977 if (NILP (props) && STRINGP (object) 977 if (NILP (properties) && STRINGP (object)
978 && XFASTINT (start) == 0 978 && XFASTINT (start) == 0
979 && XFASTINT (end) == XSTRING (object)->size) 979 && XFASTINT (end) == XSTRING (object)->size)
980 { 980 {
@@ -986,8 +986,8 @@ is the string or buffer containing the text.")
986 986
987 if (NULL_INTERVAL_P (i)) 987 if (NULL_INTERVAL_P (i))
988 { 988 {
989 /* If buffer has no props, and we want none, return now. */ 989 /* If buffer has no properties, and we want none, return now. */
990 if (NILP (props)) 990 if (NILP (properties))
991 return Qnil; 991 return Qnil;
992 992
993 /* Restore the original START and END values 993 /* Restore the original START and END values
@@ -1013,11 +1013,11 @@ is the string or buffer containing the text.")
1013 { 1013 {
1014 copy_properties (unchanged, i); 1014 copy_properties (unchanged, i);
1015 i = split_interval_left (i, len); 1015 i = split_interval_left (i, len);
1016 set_properties (props, i, object); 1016 set_properties (properties, i, object);
1017 return Qt; 1017 return Qt;
1018 } 1018 }
1019 1019
1020 set_properties (props, i, object); 1020 set_properties (properties, i, object);
1021 1021
1022 if (LENGTH (i) == len) 1022 if (LENGTH (i) == len)
1023 return Qt; 1023 return Qt;
@@ -1041,7 +1041,7 @@ is the string or buffer containing the text.")
1041 /* We have to call set_properties even if we are going to 1041 /* We have to call set_properties even if we are going to
1042 merge the intervals, so as to make the undo records 1042 merge the intervals, so as to make the undo records
1043 and cause redisplay to happen. */ 1043 and cause redisplay to happen. */
1044 set_properties (props, i, object); 1044 set_properties (properties, i, object);
1045 if (!NULL_INTERVAL_P (prev_changed)) 1045 if (!NULL_INTERVAL_P (prev_changed))
1046 merge_interval_left (i); 1046 merge_interval_left (i);
1047 return Qt; 1047 return Qt;
@@ -1052,7 +1052,7 @@ is the string or buffer containing the text.")
1052 /* We have to call set_properties even if we are going to 1052 /* We have to call set_properties even if we are going to
1053 merge the intervals, so as to make the undo records 1053 merge the intervals, so as to make the undo records
1054 and cause redisplay to happen. */ 1054 and cause redisplay to happen. */
1055 set_properties (props, i, object); 1055 set_properties (properties, i, object);
1056 if (NULL_INTERVAL_P (prev_changed)) 1056 if (NULL_INTERVAL_P (prev_changed))
1057 prev_changed = i; 1057 prev_changed = i;
1058 else 1058 else
@@ -1067,14 +1067,14 @@ is the string or buffer containing the text.")
1067DEFUN ("remove-text-properties", Fremove_text_properties, 1067DEFUN ("remove-text-properties", Fremove_text_properties,
1068 Sremove_text_properties, 3, 4, 0, 1068 Sremove_text_properties, 3, 4, 0,
1069 "Remove some properties from text from START to END.\n\ 1069 "Remove some properties from text from START to END.\n\
1070The third argument PROPS is a property list\n\ 1070The third argument PROPERTIES is a property list\n\
1071whose property names specify the properties to remove.\n\ 1071whose property names specify the properties to remove.\n\
1072\(The values stored in PROPS are ignored.)\n\ 1072\(The values stored in PROPERTIES are ignored.)\n\
1073The optional fourth argument, OBJECT,\n\ 1073The optional fourth argument, OBJECT,\n\
1074is the string or buffer containing the text.\n\ 1074is the string or buffer containing the text.\n\
1075Return t if any property was actually removed, nil otherwise.") 1075Return t if any property was actually removed, nil otherwise.")
1076 (start, end, props, object) 1076 (start, end, properties, object)
1077 Lisp_Object start, end, props, object; 1077 Lisp_Object start, end, properties, object;
1078{ 1078{
1079 register INTERVAL i, unchanged; 1079 register INTERVAL i, unchanged;
1080 register int s, len, modified = 0; 1080 register int s, len, modified = 0;
@@ -1093,7 +1093,7 @@ Return t if any property was actually removed, nil otherwise.")
1093 { 1093 {
1094 /* No properties on this first interval -- return if 1094 /* No properties on this first interval -- return if
1095 it covers the entire region. */ 1095 it covers the entire region. */
1096 if (! interval_has_some_properties (props, i)) 1096 if (! interval_has_some_properties (properties, i))
1097 { 1097 {
1098 int got = (LENGTH (i) - (s - i->position)); 1098 int got = (LENGTH (i) - (s - i->position));
1099 if (got >= len) 1099 if (got >= len)
@@ -1119,12 +1119,12 @@ Return t if any property was actually removed, nil otherwise.")
1119 1119
1120 if (LENGTH (i) >= len) 1120 if (LENGTH (i) >= len)
1121 { 1121 {
1122 if (! interval_has_some_properties (props, i)) 1122 if (! interval_has_some_properties (properties, i))
1123 return modified ? Qt : Qnil; 1123 return modified ? Qt : Qnil;
1124 1124
1125 if (LENGTH (i) == len) 1125 if (LENGTH (i) == len)
1126 { 1126 {
1127 remove_properties (props, i, object); 1127 remove_properties (properties, i, object);
1128 return Qt; 1128 return Qt;
1129 } 1129 }
1130 1130
@@ -1132,25 +1132,25 @@ Return t if any property was actually removed, nil otherwise.")
1132 unchanged = i; 1132 unchanged = i;
1133 i = split_interval_left (i, len); 1133 i = split_interval_left (i, len);
1134 copy_properties (unchanged, i); 1134 copy_properties (unchanged, i);
1135 remove_properties (props, i, object); 1135 remove_properties (properties, i, object);
1136 return Qt; 1136 return Qt;
1137 } 1137 }
1138 1138
1139 len -= LENGTH (i); 1139 len -= LENGTH (i);
1140 modified += remove_properties (props, i, object); 1140 modified += remove_properties (properties, i, object);
1141 i = next_interval (i); 1141 i = next_interval (i);
1142 } 1142 }
1143} 1143}
1144 1144
1145DEFUN ("text-property-any", Ftext_property_any, 1145DEFUN ("text-property-any", Ftext_property_any,
1146 Stext_property_any, 4, 5, 0, 1146 Stext_property_any, 4, 5, 0,
1147 "Check text from START to END to see if PROP is ever `eq' to VALUE.\n\ 1147 "Check text from START to END for property PROPERTY equalling VALUE.\n\
1148If so, return the position of the first character whose PROP is `eq'\n\ 1148If so, return the position of the first character whose property PROPERTY\n\
1149to VALUE. Otherwise return nil.\n\ 1149is `eq' to VALUE. Otherwise return nil.\n\
1150The optional fifth argument, OBJECT, is the string or buffer\n\ 1150The optional fifth argument, OBJECT, is the string or buffer\n\
1151containing the text.") 1151containing the text.")
1152 (start, end, prop, value, object) 1152 (start, end, property, value, object)
1153 Lisp_Object start, end, prop, value, object; 1153 Lisp_Object start, end, property, value, object;
1154{ 1154{
1155 register INTERVAL i; 1155 register INTERVAL i;
1156 register int e, pos; 1156 register int e, pos;
@@ -1166,7 +1166,7 @@ containing the text.")
1166 { 1166 {
1167 if (i->position >= e) 1167 if (i->position >= e)
1168 break; 1168 break;
1169 if (EQ (textget (i->plist, prop), value)) 1169 if (EQ (textget (i->plist, property), value))
1170 { 1170 {
1171 pos = i->position; 1171 pos = i->position;
1172 if (pos < XINT (start)) 1172 if (pos < XINT (start))
@@ -1180,13 +1180,13 @@ containing the text.")
1180 1180
1181DEFUN ("text-property-not-all", Ftext_property_not_all, 1181DEFUN ("text-property-not-all", Ftext_property_not_all,
1182 Stext_property_not_all, 4, 5, 0, 1182 Stext_property_not_all, 4, 5, 0,
1183 "Check text from START to END to see if PROP is ever not `eq' to VALUE.\n\ 1183 "Check text from START to END for property PROPERTY not equalling VALUE.\n\
1184If so, return the position of the first character whose PROP is not\n\ 1184If so, return the position of the first character whose property PROPERTY\n\
1185`eq' to VALUE. Otherwise, return nil.\n\ 1185is not `eq' to VALUE. Otherwise, return nil.\n\
1186The optional fifth argument, OBJECT, is the string or buffer\n\ 1186The optional fifth argument, OBJECT, is the string or buffer\n\
1187containing the text.") 1187containing the text.")
1188 (start, end, prop, value, object) 1188 (start, end, property, value, object)
1189 Lisp_Object start, end, prop, value, object; 1189 Lisp_Object start, end, property, value, object;
1190{ 1190{
1191 register INTERVAL i; 1191 register INTERVAL i;
1192 register int s, e; 1192 register int s, e;
@@ -1203,7 +1203,7 @@ containing the text.")
1203 { 1203 {
1204 if (i->position >= e) 1204 if (i->position >= e)
1205 break; 1205 break;
1206 if (! EQ (textget (i->plist, prop), value)) 1206 if (! EQ (textget (i->plist, property), value))
1207 { 1207 {
1208 if (i->position > s) 1208 if (i->position > s)
1209 s = i->position; 1209 s = i->position;