Commit d615870a authored by David Kastrup's avatar David Kastrup
Browse files

(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.
parent 52953197
2005-03-22 David Kastrup <dak@gnu.org>
* textprop.c (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.
2005-03-21 Thien-Thi Nguyen <ttn@gnu.org> 2005-03-21 Thien-Thi Nguyen <ttn@gnu.org>
   
* s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Define if undefined. * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Define if undefined.
......
...@@ -729,7 +729,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) ...@@ -729,7 +729,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
temp = Fnext_overlay_change (position); temp = Fnext_overlay_change (position);
if (! NILP (limit)) if (! NILP (limit))
{ {
CHECK_NUMBER (limit); CHECK_NUMBER_COERCE_MARKER (limit);
if (XINT (limit) < XINT (temp)) if (XINT (limit) < XINT (temp))
temp = limit; temp = limit;
} }
...@@ -754,7 +754,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) ...@@ -754,7 +754,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
temp = Fprevious_overlay_change (position); temp = Fprevious_overlay_change (position);
if (! NILP (limit)) if (! NILP (limit))
{ {
CHECK_NUMBER (limit); CHECK_NUMBER_COERCE_MARKER (limit);
if (XINT (limit) > XINT (temp)) if (XINT (limit) > XINT (temp))
temp = limit; temp = limit;
} }
...@@ -787,7 +787,10 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) ...@@ -787,7 +787,10 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
if (NILP (limit)) if (NILP (limit))
position = make_number (SCHARS (object)); position = make_number (SCHARS (object));
else else
position = limit; {
CHECK_NUMBER (limit);
position = limit;
}
} }
} }
else else
...@@ -804,6 +807,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) ...@@ -804,6 +807,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
Fset_buffer (object); Fset_buffer (object);
} }
CHECK_NUMBER_COERCE_MARKER (position);
initial_value = Fget_char_property (position, prop, object); initial_value = Fget_char_property (position, prop, object);
if (NILP (limit)) if (NILP (limit))
...@@ -856,7 +861,10 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) ...@@ -856,7 +861,10 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
if (NILP (limit)) if (NILP (limit))
position = make_number (SCHARS (object)); position = make_number (SCHARS (object));
else else
position = limit; {
CHECK_NUMBER (limit);
position = limit;
}
} }
} }
else else
...@@ -872,6 +880,8 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) ...@@ -872,6 +880,8 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
Fset_buffer (object); Fset_buffer (object);
} }
CHECK_NUMBER_COERCE_MARKER (position);
if (NILP (limit)) if (NILP (limit))
XSETFASTINT (limit, BUF_BEGV (current_buffer)); XSETFASTINT (limit, BUF_BEGV (current_buffer));
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment