> (2) Modify `jit-lock-after-change' appropriately by, for example, inserting > > (forward-line (- font-lock-lines-before)) > > before > > (setq start (line-beginning-position)) > > That seems like the right fix. Why do you think it isn't? > >
Because this means that every time I insert one character, redisplay would refontify `font-lock-lines-before' in addition to the current line. I suppose that the impact of this variable has not been noticed so far because jit-lock doesn't consider it. On the other hand, jit-lock wouldn't be able to handle this variable in the same way as font-lock does: font-lock refontifies immediately in the after-change hook. jit-lock's after-change hook would only reset the fontified property to nil. Whether and when these lines are refontified would be _also_ decided by the redisplay engine. And the latter doesn't know about `font-lock-lines-before'. For example, editing the first line in a window would not "include the line before in refontification". _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel