> Because this means that every time I insert one character, redisplay
> would refontify `font-lock-lines-before' in addition to the current
> line.
>
> Would that be bad?
It would slow down editing long lines. jit-lock is supposed to make
editing faster.
>
> 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".
>
> This is a good point. However, it can probably be fixed by a change in
> the fontification function--when it is called, it should extend the starting
> point for refontification upward by the specified number of lines.
> (This might be the only fix needed.)
>
>
In `font-lock-default-fontify-region', immediately before the comment
;; check to see if we should expand the beg/end area for
;; proper multiline matches
insert either
(setq beg (line-beginning-position (1- font-lock-lines-before)))
or - but this would have to be mentioned in the doc-string of
`font-lock-lines-before' -
(when font-lock-multiline
(setq beg (line-beginning-position (1- font-lock-lines-before))))
remove the corresponding line from `font-lock-after-change-function' and
wait what happens? I'm still sceptical, though ... fontifications would
always overlap by `font-lock-lines-before' lines.
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel