/* If we are asked for a point, but from a subr which operates
on a range, then return nothing. */
- if (*begin == *end && begin != end)
+ if (EQ (*begin, *end) && begin != end)
return NULL_INTERVAL;
if (XINT (*begin) > XINT (*end))
/* Return the value of PROP in property-list PLIST, or Qunbound if it
has none. */
-static int
+static Lisp_Object
property_value (plist, prop)
Lisp_Object plist, prop;
{
if (WINDOWP (object))
{
w = XWINDOW (object);
- XSET (object, Lisp_Buffer, w->buffer);
+ object = w->buffer;
}
if (BUFFERP (object))
{
if (! NILP (limit) && !(next->position < XFASTINT (limit)))
return limit;
- return next->position - (XTYPE (object) == Lisp_String);
+ XFASTINT (pos) = next->position - (XTYPE (object) == Lisp_String);
+ return pos;
}
/* Return 1 if there's a change in some property between BEG and END. */
if (! NILP (limit) && !(next->position < XFASTINT (limit)))
return limit;
- return next->position - (XTYPE (object) == Lisp_String);
+ XFASTINT (pos) = next->position - (XTYPE (object) == Lisp_String);
+ return pos;
}
DEFUN ("previous-property-change", Fprevious_property_change,
&& !(previous->position + LENGTH (previous) > XFASTINT (limit)))
return limit;
- return (previous->position + LENGTH (previous)
- - (XTYPE (object) == Lisp_String));
+ XFASTINT (pos) = (previous->position + LENGTH (previous)
+ - (XTYPE (object) == Lisp_String));
+ return pos;
}
DEFUN ("previous-single-property-change", Fprevious_single_property_change,
&& !(previous->position + LENGTH (previous) > XFASTINT (limit)))
return limit;
- return (previous->position + LENGTH (previous)
- - (XTYPE (object) == Lisp_String));
+ XFASTINT (pos) = (previous->position + LENGTH (previous)
+ - (XTYPE (object) == Lisp_String));
+ return pos;
}
DEFUN ("add-text-properties", Fadd_text_properties,