diff options
| author | Joakim Verona | 2012-08-15 21:49:40 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-08-15 21:49:40 +0200 |
| commit | b648c26ec642a1dc58c0bd7e59d6011b964dbe37 (patch) | |
| tree | f0f3b38ffa9054702f475fc53622e28da14f97b1 /src/syntax.c | |
| parent | c8b0fc1999006af5a4317b44068fac13d9592143 (diff) | |
| parent | 94c9ece10275f8ca9323c38f93607f1046035c79 (diff) | |
| download | emacs-b648c26ec642a1dc58c0bd7e59d6011b964dbe37.tar.gz emacs-b648c26ec642a1dc58c0bd7e59d6011b964dbe37.zip | |
upstream
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/syntax.c b/src/syntax.c index f0e30803dea..08a63e033b2 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 |
| @@ -836,7 +836,7 @@ One argument, a syntax table. */) | |||
| 836 | { | 836 | { |
| 837 | int idx; | 837 | int idx; |
| 838 | check_syntax_table (table); | 838 | check_syntax_table (table); |
| 839 | BVAR (current_buffer, syntax_table) = table; | 839 | BSET (current_buffer, syntax_table, table); |
| 840 | /* Indicate that this buffer now has a specified syntax table. */ | 840 | /* Indicate that this buffer now has a specified syntax table. */ |
| 841 | idx = PER_BUFFER_VAR_IDX (syntax_table); | 841 | idx = PER_BUFFER_VAR_IDX (syntax_table); |
| 842 | SET_PER_BUFFER_VALUE_P (current_buffer, idx, 1); | 842 | SET_PER_BUFFER_VALUE_P (current_buffer, idx, 1); |
| @@ -1009,7 +1009,7 @@ The first character of NEWENTRY should be one of the following: | |||
| 1009 | " string quote. \\ escape. | 1009 | " string quote. \\ escape. |
| 1010 | $ paired delimiter. ' expression quote or prefix operator. | 1010 | $ paired delimiter. ' expression quote or prefix operator. |
| 1011 | < comment starter. > comment ender. | 1011 | < comment starter. > comment ender. |
| 1012 | / character-quote. @ inherit from `standard-syntax-table'. | 1012 | / character-quote. @ inherit from parent table. |
| 1013 | | generic string fence. ! generic comment fence. | 1013 | | generic string fence. ! generic comment fence. |
| 1014 | 1014 | ||
| 1015 | Only single-character comment start and end sequences are represented thus. | 1015 | Only single-character comment start and end sequences are represented thus. |