summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-09-19 00:18:27 +0000
committerKarl Heuer <kwzh@gnu.org>1994-09-19 00:18:27 +0000
commit9024e1692d72c470ed1ede5fa07cba4a40913943 (patch)
tree13f9b774b2673f3b31c906f0812c97b0ca45233c /src/textprop.c
parent2e235de7dbac824796f475789b3cefddda3718a4 (diff)
downloademacs-9024e1692d72c470ed1ede5fa07cba4a40913943.tar.gz
(validate_interval_range, property_value, Fget_char_property,
Fnext_property_change, Fnext_single_property_change, Fprevious_property_change, Fprevious_single_property_change): Fix Lisp_Object vs. int problems.
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/textprop.c b/src/textprop.c
index f3d5917a08d..515838732c8 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -102,7 +102,7 @@ validate_interval_range (object, begin, end, force)
/* 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))
@@ -248,7 +248,7 @@ interval_has_some_properties (plist, i)
/* 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;
{
@@ -529,7 +529,7 @@ overlays are considered only if they are associated with OBJECT.")
if (WINDOWP (object))
{
w = XWINDOW (object);
- XSET (object, Lisp_Buffer, w->buffer);
+ object = w->buffer;
}
if (BUFFERP (object))
{
@@ -603,7 +603,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
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. */
@@ -677,7 +678,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
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,
@@ -720,8 +722,9 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
&& !(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,
@@ -769,8 +772,9 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.")
&& !(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,