diff options
| author | Stefan Monnier | 2015-11-21 22:05:28 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2015-11-21 22:05:28 -0500 |
| commit | 702d76dbee8447f56d01009142983f09e7507d6f (patch) | |
| tree | c4bb2e544ae9e87ff14f1254d64537b92868384b /src/syntax.h | |
| parent | 8e84823f3f06714d0668060d62456cf7e3100e6c (diff) | |
| download | emacs-702d76dbee8447f56d01009142983f09e7507d6f.tar.gz emacs-702d76dbee8447f56d01009142983f09e7507d6f.zip | |
Unrevert most of regexp reentrancy abort patch
The problem was in:
* src/syntax.c (update_syntax_table_forward): Propertize even when truncated
which is hence not unreverted.
The rest is:
* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
(UPDATE_SYNTAX_TABLE_FAST): Re-introduce.
All callers in regex.c changed back to the _FAST versions.
* test/automated/message-mode-tests.el: Tweak the test to rely on auto
propertization in backward-sexp.
Diffstat (limited to 'src/syntax.h')
| -rw-r--r-- | src/syntax.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/syntax.h b/src/syntax.h index 06ce0ec55df..eb154e088c9 100644 --- a/src/syntax.h +++ b/src/syntax.h | |||
| @@ -186,6 +186,13 @@ UPDATE_SYNTAX_TABLE_FORWARD (ptrdiff_t charpos) | |||
| 186 | false, gl_state.object); | 186 | false, gl_state.object); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | INLINE void | ||
| 190 | UPDATE_SYNTAX_TABLE_FORWARD_FAST (ptrdiff_t charpos) | ||
| 191 | { | ||
| 192 | if (parse_sexp_lookup_properties && charpos >= gl_state.e_property) | ||
| 193 | update_syntax_table (charpos + gl_state.offset, 1, false, gl_state.object); | ||
| 194 | } | ||
| 195 | |||
| 189 | /* Make syntax table state (gl_state) good for CHARPOS, assuming it is | 196 | /* Make syntax table state (gl_state) good for CHARPOS, assuming it is |
| 190 | currently good for a position after CHARPOS. */ | 197 | currently good for a position after CHARPOS. */ |
| 191 | 198 | ||
| @@ -205,6 +212,13 @@ UPDATE_SYNTAX_TABLE (ptrdiff_t charpos) | |||
| 205 | UPDATE_SYNTAX_TABLE_FORWARD (charpos); | 212 | UPDATE_SYNTAX_TABLE_FORWARD (charpos); |
| 206 | } | 213 | } |
| 207 | 214 | ||
| 215 | INLINE void | ||
| 216 | UPDATE_SYNTAX_TABLE_FAST (ptrdiff_t charpos) | ||
| 217 | { | ||
| 218 | UPDATE_SYNTAX_TABLE_BACKWARD (charpos); | ||
| 219 | UPDATE_SYNTAX_TABLE_FORWARD_FAST (charpos); | ||
| 220 | } | ||
| 221 | |||
| 208 | /* Set up the buffer-global syntax table. */ | 222 | /* Set up the buffer-global syntax table. */ |
| 209 | 223 | ||
| 210 | INLINE void | 224 | INLINE void |