diff options
author | David Kastrup <[email protected]> | 2005-03-22 16:04:02 +0000 |
---|---|---|
committer | David Kastrup <[email protected]> | 2005-03-22 16:04:02 +0000 |
commit | d615870ac51052b656ac5df860cd7afe885be5ad (patch) | |
tree | f23906c298f8d71e20d7cfd8f1b5861f01547370 | |
parent | 52953197560f64c44d0230a5e05c3750a188fefd (diff) |
(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.
-rw-r--r-- | src/ChangeLog | 10 | ||||
-rw-r--r-- | src/textprop.c | 18 |
2 files changed, 24 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ffe7e87287..35961e7197 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2005-03-22 David Kastrup <[email protected]> + + * 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 <[email protected]> * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Define if undefined. diff --git a/src/textprop.c b/src/textprop.c index 317f8fa6aa..e6dd411dcc 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -729,7 +729,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) temp = Fnext_overlay_change (position); if (! NILP (limit)) { - CHECK_NUMBER (limit); + CHECK_NUMBER_COERCE_MARKER (limit); if (XINT (limit) < XINT (temp)) temp = limit; } @@ -754,7 +754,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) temp = Fprevious_overlay_change (position); if (! NILP (limit)) { - CHECK_NUMBER (limit); + CHECK_NUMBER_COERCE_MARKER (limit); if (XINT (limit) > XINT (temp)) temp = limit; } @@ -787,7 +787,10 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) if (NILP (limit)) position = make_number (SCHARS (object)); else - position = limit; + { + CHECK_NUMBER (limit); + position = limit; + } } } else @@ -804,6 +807,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) Fset_buffer (object); } + CHECK_NUMBER_COERCE_MARKER (position); + initial_value = Fget_char_property (position, prop, object); if (NILP (limit)) @@ -856,7 +861,10 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) if (NILP (limit)) position = make_number (SCHARS (object)); else - position = limit; + { + CHECK_NUMBER (limit); + position = limit; + } } } else @@ -872,6 +880,8 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) Fset_buffer (object); } + CHECK_NUMBER_COERCE_MARKER (position); + if (NILP (limit)) XSETFASTINT (limit, BUF_BEGV (current_buffer)); else |