Mercurial > emacs
comparison src/textprop.c @ 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 | 7be89f84a882 |
children | c0560357c84e |
comparison
equal
deleted
inserted
replaced
3995:cdab67a10461 | 3996:b9bdcf862c67 |
---|---|
139 && XINT (*end) <= s->size)) | 139 && XINT (*end) <= s->size)) |
140 args_out_of_range (*begin, *end); | 140 args_out_of_range (*begin, *end); |
141 /* User-level Positions in strings start with 0, | 141 /* User-level Positions in strings start with 0, |
142 but the interval code always wants positions starting with 1. */ | 142 but the interval code always wants positions starting with 1. */ |
143 XFASTINT (*begin) += 1; | 143 XFASTINT (*begin) += 1; |
144 XFASTINT (*end) += 1; | 144 if (begin != end) |
145 XFASTINT (*end) += 1; | |
145 i = s->intervals; | 146 i = s->intervals; |
146 | 147 |
147 if (s->size == 0) | 148 if (s->size == 0) |
148 return NULL_INTERVAL; | 149 return NULL_INTERVAL; |
149 | 150 |
171 if (CONSP (list)) | 172 if (CONSP (list)) |
172 { | 173 { |
173 register int i; | 174 register int i; |
174 register Lisp_Object tail; | 175 register Lisp_Object tail; |
175 for (i = 0, tail = list; !NILP (tail); i++) | 176 for (i = 0, tail = list; !NILP (tail); i++) |
176 tail = Fcdr (tail); | 177 { |
178 tail = Fcdr (tail); | |
179 QUIT; | |
180 } | |
177 if (i & 1) | 181 if (i & 1) |
178 error ("Odd length text property list"); | 182 error ("Odd length text property list"); |
179 return list; | 183 return list; |
180 } | 184 } |
181 | 185 |