diff options
| author | Karl Heuer | 1994-09-19 00:18:27 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-09-19 00:18:27 +0000 |
| commit | 64a49ca7b18fd0791a14bb02a2ac8ce082511fb8 (patch) | |
| tree | 37260e85df60d7fca2272695d6e81f433f974c4f /src/textprop.c | |
| parent | 5ef2a3c0465660b2c32f2304034ec93722425172 (diff) | |
| download | emacs-64a49ca7b18fd0791a14bb02a2ac8ce082511fb8.tar.gz emacs-64a49ca7b18fd0791a14bb02a2ac8ce082511fb8.zip | |
(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.c | 22 |
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) | |||
| 102 | 102 | ||
| 103 | /* If we are asked for a point, but from a subr which operates | 103 | /* If we are asked for a point, but from a subr which operates |
| 104 | on a range, then return nothing. */ | 104 | on a range, then return nothing. */ |
| 105 | if (*begin == *end && begin != end) | 105 | if (EQ (*begin, *end) && begin != end) |
| 106 | return NULL_INTERVAL; | 106 | return NULL_INTERVAL; |
| 107 | 107 | ||
| 108 | if (XINT (*begin) > XINT (*end)) | 108 | if (XINT (*begin) > XINT (*end)) |
| @@ -248,7 +248,7 @@ interval_has_some_properties (plist, i) | |||
| 248 | 248 | ||
| 249 | /* Return the value of PROP in property-list PLIST, or Qunbound if it | 249 | /* Return the value of PROP in property-list PLIST, or Qunbound if it |
| 250 | has none. */ | 250 | has none. */ |
| 251 | static int | 251 | static Lisp_Object |
| 252 | property_value (plist, prop) | 252 | property_value (plist, prop) |
| 253 | Lisp_Object plist, prop; | 253 | Lisp_Object plist, prop; |
| 254 | { | 254 | { |
| @@ -529,7 +529,7 @@ overlays are considered only if they are associated with OBJECT.") | |||
| 529 | if (WINDOWP (object)) | 529 | if (WINDOWP (object)) |
| 530 | { | 530 | { |
| 531 | w = XWINDOW (object); | 531 | w = XWINDOW (object); |
| 532 | XSET (object, Lisp_Buffer, w->buffer); | 532 | object = w->buffer; |
| 533 | } | 533 | } |
| 534 | if (BUFFERP (object)) | 534 | if (BUFFERP (object)) |
| 535 | { | 535 | { |
| @@ -603,7 +603,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.") | |||
| 603 | if (! NILP (limit) && !(next->position < XFASTINT (limit))) | 603 | if (! NILP (limit) && !(next->position < XFASTINT (limit))) |
| 604 | return limit; | 604 | return limit; |
| 605 | 605 | ||
| 606 | return next->position - (XTYPE (object) == Lisp_String); | 606 | XFASTINT (pos) = next->position - (XTYPE (object) == Lisp_String); |
| 607 | return pos; | ||
| 607 | } | 608 | } |
| 608 | 609 | ||
| 609 | /* Return 1 if there's a change in some property between BEG and END. */ | 610 | /* 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.") | |||
| 677 | if (! NILP (limit) && !(next->position < XFASTINT (limit))) | 678 | if (! NILP (limit) && !(next->position < XFASTINT (limit))) |
| 678 | return limit; | 679 | return limit; |
| 679 | 680 | ||
| 680 | return next->position - (XTYPE (object) == Lisp_String); | 681 | XFASTINT (pos) = next->position - (XTYPE (object) == Lisp_String); |
| 682 | return pos; | ||
| 681 | } | 683 | } |
| 682 | 684 | ||
| 683 | DEFUN ("previous-property-change", Fprevious_property_change, | 685 | DEFUN ("previous-property-change", Fprevious_property_change, |
| @@ -720,8 +722,9 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT.") | |||
| 720 | && !(previous->position + LENGTH (previous) > XFASTINT (limit))) | 722 | && !(previous->position + LENGTH (previous) > XFASTINT (limit))) |
| 721 | return limit; | 723 | return limit; |
| 722 | 724 | ||
| 723 | return (previous->position + LENGTH (previous) | 725 | XFASTINT (pos) = (previous->position + LENGTH (previous) |
| 724 | - (XTYPE (object) == Lisp_String)); | 726 | - (XTYPE (object) == Lisp_String)); |
| 727 | return pos; | ||
| 725 | } | 728 | } |
| 726 | 729 | ||
| 727 | DEFUN ("previous-single-property-change", Fprevious_single_property_change, | 730 | 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.") | |||
| 769 | && !(previous->position + LENGTH (previous) > XFASTINT (limit))) | 772 | && !(previous->position + LENGTH (previous) > XFASTINT (limit))) |
| 770 | return limit; | 773 | return limit; |
| 771 | 774 | ||
| 772 | return (previous->position + LENGTH (previous) | 775 | XFASTINT (pos) = (previous->position + LENGTH (previous) |
| 773 | - (XTYPE (object) == Lisp_String)); | 776 | - (XTYPE (object) == Lisp_String)); |
| 777 | return pos; | ||
| 774 | } | 778 | } |
| 775 | 779 | ||
| 776 | DEFUN ("add-text-properties", Fadd_text_properties, | 780 | DEFUN ("add-text-properties", Fadd_text_properties, |