Subject: Re: bug#19511: 25.0.50; Failed assertions in redisplay() code. (dispnew.c:1405; xdisp.c:17524)

From: Stefan Monnier <[email-masked]>
Date: Mon, 05 Jan 2015 12:53:54 -0500

> Removing it doesn't change the fact that buffers are switched
> (with-current-buffer ...) inside font-lock-fontify-region-function.

with-current-buffer is basically equivalent to something like

  (let ((current-buffer ..)) ...)

[ tho implemented differently for technical reasons.  ]
So it doesn't have any undesirable interactions with the redisplay code.

> Would it be enough to remove `bury-buffer` call to get back the
> optimization? What are other elisp functions that can potentially
> invalidate window_end?

Any function which changes which buffer is being displayed in
a particular window.

        Stefan