]> git.eshelyaron.com Git - emacs.git/commitdiff
* textprop.c (validate_interval_range): Don't increment both
authorJim Blandy <jimb@redhat.com>
Mon, 5 Jul 1993 08:13:50 +0000 (08:13 +0000)
committerJim Blandy <jimb@redhat.com>
Mon, 5 Jul 1993 08:13:50 +0000 (08:13 +0000)
*begin and *end if they point to the same thing.
(validate_plist): Call QUIT while scanning LIST.

src/textprop.c

index d22178d0aa3747bcf141c79e98f20cda8b54991f..384682cd25654b99cc20103ccc9adaa31d581ec3 100644 (file)
@@ -141,7 +141,8 @@ validate_interval_range (object, begin, end, force)
       /* User-level Positions in strings start with 0,
         but the interval code always wants positions starting with 1.  */
       XFASTINT (*begin) += 1;
-      XFASTINT (*end) += 1;
+      if (begin != end)
+       XFASTINT (*end) += 1;
       i = s->intervals;
 
       if (s->size == 0)
@@ -173,7 +174,10 @@ validate_plist (list)
       register int i;
       register Lisp_Object tail;
       for (i = 0, tail = list; !NILP (tail); i++)
-       tail = Fcdr (tail);
+       {
+         tail = Fcdr (tail);
+         QUIT;
+       }
       if (i & 1)
        error ("Odd length text property list");
       return list;