aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-08 10:11:29 +0400
committerDmitry Antipov2012-08-08 10:11:29 +0400
commit77c7bcb1157b405bde1227b20ef5f7ce9a90e689 (patch)
tree3daa729dc8fd54db0dff9ace5de1274e992a7d6b /src/syntax.c
parent9c08a8d4b549df18f815412d2a5494d28253179f (diff)
downloademacs-77c7bcb1157b405bde1227b20ef5f7ce9a90e689.tar.gz
emacs-77c7bcb1157b405bde1227b20ef5f7ce9a90e689.zip
Cleanup intervals.
* intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove. (NULL_INTERVAL_P): Likewise. Adjust users. (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P): Adjust comment. Move under #if 0. * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c: * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 1299d2e9931..c031c2b07af 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -171,7 +171,7 @@ struct gl_state_s gl_state; /* Global state of syntax parser. */
171 direction than the intervals - or in an interval. We update the 171 direction than the intervals - or in an interval. We update the
172 current syntax-table basing on the property of this interval, and 172 current syntax-table basing on the property of this interval, and
173 update the interval to start further than CHARPOS - or be 173 update the interval to start further than CHARPOS - or be
174 NULL_INTERVAL. We also update lim_property to be the next value of 174 NULL. We also update lim_property to be the next value of
175 charpos to call this subroutine again - or be before/after the 175 charpos to call this subroutine again - or be before/after the
176 start/end of OBJECT. */ 176 start/end of OBJECT. */
177 177
@@ -192,7 +192,7 @@ update_syntax_table (ptrdiff_t charpos, EMACS_INT count, int init,
192 i = interval_of (charpos, object); 192 i = interval_of (charpos, object);
193 gl_state.backward_i = gl_state.forward_i = i; 193 gl_state.backward_i = gl_state.forward_i = i;
194 invalidate = 0; 194 invalidate = 0;
195 if (NULL_INTERVAL_P (i)) 195 if (!i)
196 return; 196 return;
197 /* interval_of updates only ->position of the return value, so 197 /* interval_of updates only ->position of the return value, so
198 update the parents manually to speed up update_interval. */ 198 update the parents manually to speed up update_interval. */
@@ -217,7 +217,7 @@ update_syntax_table (ptrdiff_t charpos, EMACS_INT count, int init,
217 217
218 /* We are guaranteed to be called with CHARPOS either in i, 218 /* We are guaranteed to be called with CHARPOS either in i,
219 or further off. */ 219 or further off. */
220 if (NULL_INTERVAL_P (i)) 220 if (!i)
221 error ("Error in syntax_table logic for to-the-end intervals"); 221 error ("Error in syntax_table logic for to-the-end intervals");
222 else if (charpos < i->position) /* Move left. */ 222 else if (charpos < i->position) /* Move left. */
223 { 223 {
@@ -287,7 +287,7 @@ update_syntax_table (ptrdiff_t charpos, EMACS_INT count, int init,
287 } 287 }
288 } 288 }
289 289
290 while (!NULL_INTERVAL_P (i)) 290 while (i)
291 { 291 {
292 if (cnt && !EQ (tmp_table, textget (i->plist, Qsyntax_table))) 292 if (cnt && !EQ (tmp_table, textget (i->plist, Qsyntax_table)))
293 { 293 {
@@ -313,7 +313,7 @@ update_syntax_table (ptrdiff_t charpos, EMACS_INT count, int init,
313 /* e_property at EOB is not set to ZV but to ZV+1, so that 313 /* e_property at EOB is not set to ZV but to ZV+1, so that
314 we can do INC(from);UPDATE_SYNTAX_TABLE_FORWARD without 314 we can do INC(from);UPDATE_SYNTAX_TABLE_FORWARD without
315 having to check eob between the two. */ 315 having to check eob between the two. */
316 + (NULL_INTERVAL_P (next_interval (i)) ? 1 : 0); 316 + (next_interval (i) ? 0 : 1);
317 gl_state.forward_i = i; 317 gl_state.forward_i = i;
318 } 318 }
319 else 319 else
@@ -326,7 +326,7 @@ update_syntax_table (ptrdiff_t charpos, EMACS_INT count, int init,
326 cnt++; 326 cnt++;
327 i = count > 0 ? next_interval (i) : previous_interval (i); 327 i = count > 0 ? next_interval (i) : previous_interval (i);
328 } 328 }
329 eassert (NULL_INTERVAL_P (i)); /* This property goes to the end. */ 329 eassert (i == NULL); /* This property goes to the end. */
330 if (count > 0) 330 if (count > 0)
331 gl_state.e_property = gl_state.stop; 331 gl_state.e_property = gl_state.stop;
332 else 332 else