Commit ce6b02e0 authored by Miles Bader's avatar Miles Bader
Browse files

(Fprevious_single_char_property_change):

  The initial property value should be from the position preceding
  POSITION, not following it.
parent e2db3069
...@@ -769,7 +769,6 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT.") ...@@ -769,7 +769,6 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT.")
} }
else else
{ {
Lisp_Object initial_value, value;
int count = specpdl_ptr - specpdl; int count = specpdl_ptr - specpdl;
if (! NILP (object)) if (! NILP (object))
...@@ -786,19 +785,31 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT.") ...@@ -786,19 +785,31 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT.")
else else
CHECK_NUMBER_COERCE_MARKER (limit, 0); CHECK_NUMBER_COERCE_MARKER (limit, 0);
initial_value = Fget_char_property (position, prop, object); if (XFASTINT (position) <= XFASTINT (limit))
position = limit;
for (;;) else
{ {
position = Fprevious_char_property_change (position, limit); Lisp_Object initial_value =
if (XFASTINT (position) <= XFASTINT (limit)) { Fget_char_property (position - 1, prop, object);
position = limit;
break; for (;;)
} {
position = Fprevious_char_property_change (position, limit);
value = Fget_char_property (position - 1, prop, object); if (XFASTINT (position) <= XFASTINT (limit))
if (!EQ (value, initial_value)) {
break; position = limit;
break;
}
else
{
Lisp_Object value =
Fget_char_property (position - 1, prop, object);
if (!EQ (value, initial_value))
break;
}
}
} }
unbind_to (count, Qnil); unbind_to (count, Qnil);
......
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