[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100413: * xdisp.c (handle_fontifi
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100413: * xdisp.c (handle_fontified_prop): Be careful with font-lock changing |
Date: |
Mon, 24 Jan 2011 17:05:52 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100413
committer: Stefan Monnier <address@hidden>
branch nick: emacs-23
timestamp: Mon 2011-01-24 17:05:52 -0500
message:
* xdisp.c (handle_fontified_prop): Be careful with font-lock changing
the buffer's point-max.
modified:
src/ChangeLog
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-01-23 22:38:13 +0000
+++ b/src/ChangeLog 2011-01-24 22:05:52 +0000
@@ -1,3 +1,8 @@
+2011-01-24 Stefan Monnier <address@hidden>
+
+ * xdisp.c (handle_fontified_prop): Be careful with font-lock changing
+ the buffer's point-max (bug#7876).
+
2011-01-23 Chong Yidong <address@hidden>
* lisp.h (XPNTR): Obey DATA_SEG_BITS in all non-USE_LSB_TAG cases.
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2011-01-02 23:50:46 +0000
+++ b/src/xdisp.c 2011-01-24 22:05:52 +0000
@@ -3337,6 +3337,8 @@
val = Vfontification_functions;
specbind (Qfontification_functions, Qnil);
+ xassert (it->end_charpos == ZV);
+
if (!CONSP (val) || EQ (XCAR (val), Qlambda))
safe_call1 (val, pos);
else
@@ -3376,6 +3378,13 @@
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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100413: * xdisp.c (handle_fontified_prop): Be careful with font-lock changing,
Stefan Monnier <=