> The problem is that in perl-mode some syntax-table text-properties are
> set in font-lock-syntactic-keywords, while others are set in
> font-lock-syntactic-face-function, and that font-lock+jit-lock applies
> font-lock-syntactic-keywords to "all" the buffer but only applies
> font-lock-syntactic-face-function to the displayed part of the buffer.
> Would it be better to apply font-lock-syntactic-face-function
> to "all" the buffer, too?
Already applying font-lock-syntactic-keywords to "all" the buffer defeats
the purpose of jit-lock. Applying font-lock-syntactic-face-function in the
same way would defeat it even more, and this only because perl-mode uses it
in a sneaky way (perl-mode is the only mode which suffers from this
problem).
> (What is the significance of those quotes around "all"?)
font-lock-syntactic-keywords is not really applied eagerly to the whole
buffer, but only to the region between point-min and the currently visible
area. In many cases, this is just as JIT as what happens with the rest of
the font-locking, but if you jump to the end of the buffer right after
opening it, it does indeed end up applying font-lock-syntactic-keywords
eagerly to the whole buffer while font-lock-keywords is only applied to the
last 40 lines. This is done in font-lock-fontify-syntactic-keywords-region
with the following lines:
;; Ensure the beginning of the file is properly syntactic-fontified.
(when (and font-lock-syntactically-fontified
(< font-lock-syntactically-fontified start))
(setq start (max font-lock-syntactically-fontified (point-min)))
(setq font-lock-syntactically-fontified end))
-- Stefan
_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug