Commit f996bbcb authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* xdisp.c (handle_fontified_prop): Be careful with font-lock changing

the buffer's point-max.

Fixes: debbugs:7876
parent 10e1d5f3
2011-01-24 Stefan Monnier <>
* xdisp.c (handle_fontified_prop): Be careful with font-lock changing
the buffer's point-max (bug#7876).
2011-01-23 Chong Yidong <>
* lisp.h (XPNTR): Obey DATA_SEG_BITS in all non-USE_LSB_TAG cases.
......@@ -3337,6 +3337,8 @@ handle_fontified_prop (it)
val = Vfontification_functions;
specbind (Qfontification_functions, Qnil);
xassert (it->end_charpos == ZV);
if (!CONSP (val) || EQ (XCAR (val), Qlambda))
safe_call1 (val, pos);
......@@ -3376,6 +3378,13 @@ handle_fontified_prop (it)
unbind_to (count, Qnil);
/* The fontification code may have added/removed text.
It could do even a lot worse, but let's at least protect against
the most obvious case where only the text past `pos' gets changed',
as is/was done in grep.el where some escapes sequences are turned
into face properties (bug#7876). */
it->end_charpos = ZV;
/* Return HANDLED_RECOMPUTE_PROPS only if function fontified
something. This avoids an endless loop if they failed to
fontify the text for which reason ever. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment