aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Kastrup2005-03-22 16:04:02 +0000
committerDavid Kastrup2005-03-22 16:04:02 +0000
commitd615870ac51052b656ac5df860cd7afe885be5ad (patch)
treef23906c298f8d71e20d7cfd8f1b5861f01547370 /src
parent52953197560f64c44d0230a5e05c3750a188fefd (diff)
downloademacs-d615870ac51052b656ac5df860cd7afe885be5ad.tar.gz
emacs-d615870ac51052b656ac5df860cd7afe885be5ad.zip
(Fnext_char_property_change)
(Fprevious_char_property_change): allow marker as limit. (Fnext_single_char_property_change) (Fprevious_single_char_property_change): Check that limit is a number in strings. (Fnext_single_char_property_change): Coerce position to integer. (Fprevious_single_char_property_change): Same here.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/textprop.c18
2 files changed, 24 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ffe7e872878..35961e71976 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12005-03-22 David Kastrup <dak@gnu.org>
2
3 * textprop.c (Fnext_char_property_change)
4 (Fprevious_char_property_change): allow marker as limit.
5 (Fnext_single_char_property_change)
6 (Fprevious_single_char_property_change): Check that limit is a
7 number in strings.
8 (Fnext_single_char_property_change): Coerce position to integer.
9 (Fprevious_single_char_property_change): Same here.
10
12005-03-21 Thien-Thi Nguyen <ttn@gnu.org> 112005-03-21 Thien-Thi Nguyen <ttn@gnu.org>
2 12
3 * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Define if undefined. 13 * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Define if undefined.
diff --git a/src/textprop.c b/src/textprop.c
index 317f8fa6aa3..e6dd411dcc5 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -729,7 +729,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
729 temp = Fnext_overlay_change (position); 729 temp = Fnext_overlay_change (position);
730 if (! NILP (limit)) 730 if (! NILP (limit))
731 { 731 {
732 CHECK_NUMBER (limit); 732 CHECK_NUMBER_COERCE_MARKER (limit);
733 if (XINT (limit) < XINT (temp)) 733 if (XINT (limit) < XINT (temp))
734 temp = limit; 734 temp = limit;
735 } 735 }
@@ -754,7 +754,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
754 temp = Fprevious_overlay_change (position); 754 temp = Fprevious_overlay_change (position);
755 if (! NILP (limit)) 755 if (! NILP (limit))
756 { 756 {
757 CHECK_NUMBER (limit); 757 CHECK_NUMBER_COERCE_MARKER (limit);
758 if (XINT (limit) > XINT (temp)) 758 if (XINT (limit) > XINT (temp))
759 temp = limit; 759 temp = limit;
760 } 760 }
@@ -787,7 +787,10 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
787 if (NILP (limit)) 787 if (NILP (limit))
788 position = make_number (SCHARS (object)); 788 position = make_number (SCHARS (object));
789 else 789 else
790 position = limit; 790 {
791 CHECK_NUMBER (limit);
792 position = limit;
793 }
791 } 794 }
792 } 795 }
793 else 796 else
@@ -804,6 +807,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
804 Fset_buffer (object); 807 Fset_buffer (object);
805 } 808 }
806 809
810 CHECK_NUMBER_COERCE_MARKER (position);
811
807 initial_value = Fget_char_property (position, prop, object); 812 initial_value = Fget_char_property (position, prop, object);
808 813
809 if (NILP (limit)) 814 if (NILP (limit))
@@ -856,7 +861,10 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
856 if (NILP (limit)) 861 if (NILP (limit))
857 position = make_number (SCHARS (object)); 862 position = make_number (SCHARS (object));
858 else 863 else
859 position = limit; 864 {
865 CHECK_NUMBER (limit);
866 position = limit;
867 }
860 } 868 }
861 } 869 }
862 else 870 else
@@ -872,6 +880,8 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
872 Fset_buffer (object); 880 Fset_buffer (object);
873 } 881 }
874 882
883 CHECK_NUMBER_COERCE_MARKER (position);
884
875 if (NILP (limit)) 885 if (NILP (limit))
876 XSETFASTINT (limit, BUF_BEGV (current_buffer)); 886 XSETFASTINT (limit, BUF_BEGV (current_buffer));
877 else 887 else