[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-25 8121757: Fix regex abort when it tries to ree
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] emacs-25 8121757: Fix regex abort when it tries to reenter itself |
Date: |
Mon, 16 Nov 2015 12:21:21 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> -update_syntax_table_forward (ptrdiff_t charpos, bool init,
> +update_syntax_table_forward (ptrdiff_t charpos, bool init, bool propertize,
> Lisp_Object object)
> {
> if (gl_state.e_property_truncated)
> {
> eassert (NILP (object));
> eassert (charpos >= gl_state.e_property);
> - parse_sexp_propertize (charpos);
> }
If propertize is false, you end up not doing anything at all, which is
wrong. This said, when propertize is false, we should (make sure we)
*never* come here anyway.
> else
> {
> update_syntax_table (charpos, 1, init, object);
> - if (gl_state.e_property > syntax_propertize__done
> - && NILP (object))
> - parse_sexp_propertize (charpos);
> + propertize &= (NILP (object)
> + && gl_state.e_property > syntax_propertize__done);
So when propertize is false, we just call update_syntax_table and do
nothing else. So, rather than add a `propertize' argument, we'd be
better off just calling update_syntax_table directly from
UPDATE_SYNTAX_TABLE_FORWARD_FAST.
Stefan
- Re: [Emacs-diffs] emacs-25 8121757: Fix regex abort when it tries to reenter itself,
Stefan Monnier <=