changeset 3996:b9bdcf862c67

* textprop.c (validate_interval_range): Don't increment both *begin and *end if they point to the same thing. (validate_plist): Call QUIT while scanning LIST.
author Jim Blandy <jimb@redhat.com>
date Mon, 05 Jul 1993 08:13:50 +0000
parents cdab67a10461
children d968bcba16af
files src/textprop.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/textprop.c	Mon Jul 05 07:57:34 1993 +0000
+++ b/src/textprop.c	Mon Jul 05 08:13:50 1993 +0000
@@ -141,7 +141,8 @@
       /* 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 @@
       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;