From: Stefan Monnier Date: Wed, 23 Sep 2015 16:33:48 +0000 (-0400) Subject: * src/syntax.c: Handle spurious e_property_truncated flag X-Git-Tag: emacs-25.0.90~1224^2~35 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4c0fed13e5ca1826bab52cd9c3fc31ad0e5c765c;p=emacs.git * src/syntax.c: Handle spurious e_property_truncated flag * src/syntax.c (parse_sexp_propertize): Handle spurious e_property_truncated flag. (update_syntax_table_forward): Remove invalid assertion. --- diff --git a/src/syntax.c b/src/syntax.c index 3bd301f0e38..6b1865f667f 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -499,6 +499,13 @@ parse_sexp_propertize (ptrdiff_t charpos) gl_state.e_property = syntax_propertize__done; gl_state.e_property_truncated = true; } + else if (gl_state.e_property_truncated) + { /* When moving backward, e_property might be set without resetting + e_property_truncated, so the e_property_truncated flag may + occasionally be left raised spuriously. This should be rare. */ + gl_state.e_property_truncated = false; + update_syntax_table_forward (charpos, false, Qnil); + } } void @@ -509,7 +516,6 @@ update_syntax_table_forward (ptrdiff_t charpos, bool init, { eassert (NILP (object)); eassert (charpos >= gl_state.e_property); - eassert (charpos >= syntax_propertize__done); parse_sexp_propertize (charpos); } else