# HG changeset patch # User Stefan Monnier # Date 1130254001 0 # Node ID 52c79134b5d5e15665e58128f8df19578979f2d2 # Parent 71a815b63b2b08f7ddcbf2442096f5af607c2885 (jit-lock-fontify-now): Be careful not to skip multiline regions when moving the jit-lock-context-unfontify-pos boundary. diff -r 71a815b63b2b -r 52c79134b5d5 lisp/jit-lock.el --- a/lisp/jit-lock.el Tue Oct 25 13:18:52 2005 +0000 +++ b/lisp/jit-lock.el Tue Oct 25 15:26:41 2005 +0000 @@ -353,7 +353,12 @@ ;; what's already been refontified. (when (and jit-lock-context-unfontify-pos (< jit-lock-context-unfontify-pos next) - (>= jit-lock-context-unfontify-pos start)) + (>= jit-lock-context-unfontify-pos start) + ;; Don't move boundary forward if we have to + ;; refontify previous text. Otherwise, we risk moving + ;; it past the end of the multiline property and thus + ;; forget about this multiline region altogether. + (not (get-text-property start 'jit-lock-defer-multiline))) (setq jit-lock-context-unfontify-pos next)) ;; Fontify the chunk, and mark it as fontified.