Mercurial > emacs
changeset 60815:21c196c81d60
(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.
author | David Kastrup <dak@gnu.org> |
---|---|
date | Tue, 22 Mar 2005 16:04:02 +0000 |
parents | a9ece659b645 |
children | f14d2a34da27 |
files | src/ChangeLog src/textprop.c |
diffstat | 2 files changed, 24 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Mar 22 11:58:28 2005 +0000 +++ b/src/ChangeLog Tue Mar 22 16:04:02 2005 +0000 @@ -1,3 +1,13 @@ +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> * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Define if undefined.
--- a/src/textprop.c Tue Mar 22 11:58:28 2005 +0000 +++ b/src/textprop.c Tue Mar 22 16:04:02 2005 +0000 @@ -729,7 +729,7 @@ 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 @@ 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 @@ if (NILP (limit)) position = make_number (SCHARS (object)); else - position = limit; + { + CHECK_NUMBER (limit); + position = limit; + } } } else @@ -804,6 +807,8 @@ Fset_buffer (object); } + CHECK_NUMBER_COERCE_MARKER (position); + initial_value = Fget_char_property (position, prop, object); if (NILP (limit)) @@ -856,7 +861,10 @@ if (NILP (limit)) position = make_number (SCHARS (object)); else - position = limit; + { + CHECK_NUMBER (limit); + position = limit; + } } } else @@ -872,6 +880,8 @@ Fset_buffer (object); } + CHECK_NUMBER_COERCE_MARKER (position); + if (NILP (limit)) XSETFASTINT (limit, BUF_BEGV (current_buffer)); else